Legacy Documentation: Version 5.0
Language: English
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Image.fillClockwise

Switch to Manual
public var fillClockwise: bool;

Description

Whether the Image should be filled clockwise (true) or counter-clockwise (false).

This willl only have any effect if the Image.type is set to Image.Type.Filled and Image.fillMethod is set to any of the Radial methods.

#pragma strict
// Required when Using UI elements.
public class FillClockwiseScript {
	public var healthCircle;
	// Clockwise for the Player, Counter Clockwise for the opponent.
	function SetHealthDirection(target) {
		if (target.tag == "Player") {
			healthCircle.fillClockwise = true;
		}
		elseif (target.tag == "Opponent") {
			healthCircle.fillClockwise = false;
		}
	}
}