コード例 #1
0
    /// <summary>
    /// Constructor.
    /// </summary>
    /// <param name="x">x coordinate on the grid.</param>
    /// <param name="y">y coordinate on the grid.</param>
    /// <param name="col">Colour of the colour picker.</param>
    /// <param name="g">Grid that the colour picker is on.</param>
    /// <param name="parent">Parent of the base object.</param>
    public ColourPicker(int x, int y, Colour col, GameObject parent)
    {
        colour = col;

        // create the colour picker
        GameObject cpObject = ResourceLoader.GetSpriteGameObject(colour + "ColourPicker", parent, (float)x, (float)y, "Tools", 0, "Sprites/Tools/ColorPicker", col);

        rotate = cpObject.AddComponent <AutoRotator>();
    }
コード例 #2
0
    /// <summary>
    /// Constructor.
    /// </summary>
    /// <param name="x">x coordinate.</param>
    /// <param name="y">y coordinate.</param>
    /// <param name="col">Colour of the splash.</param>
    /// <param name="g">Grid the splash is on.</param>
    /// <param name="parent">Parent of the base object.</param>
    public Splash(int x, int y, ColourPicker.Colour col, Grid g, GameObject parent, int radius = 2)
    {
        location     = new IntVector.IntVector2(x, y);
        colour       = col;
        grid         = g;
        splashRadius = radius;

        // create the game object
        GameObject splashObject = ResourceLoader.GetSpriteGameObject(colour + "Splash", parent, (float)x, (float)y, "Tools", 0, "Sprites/Tools/Splash", col);

        rotate = splashObject.AddComponent <AutoRotator>();
    }
コード例 #3
0
 public void Start()
 {
     rotator = mySelf.GetComponent <AutoRotator>();
     cordi   = mySelf.GetComponent <LookCoordinator>();
     cordi.Init(mirror: true);
     cordi.TestGender = true;
     string[] usings = MyInfoManager.Instance.GetUsings();
     for (int i = 0; i < usings.Length; i++)
     {
         cordi.Equip(usings[i]);
     }
     cordi.TestGender    = false;
     Weapon.isInitialize = true;
     cordi.ChangeWeapon(Weapon.TYPE.MAIN);
     Weapon.isInitialize = false;
     flip      = false;
     deltaTime = 0f;
 }
コード例 #4
0
 // Start is called before the first frame update
 void Start()
 {
     autoRotator = GetComponent <AutoRotator>();
 }