Esempio n. 1
0
 void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(gameObject);
     }
 }
Esempio n. 2
0
    private void Start()
    {
        playerSCR      = playerOBJ.GetComponent <PlayerScript>();
        gridManagerSCR = gridSystemManager.GetComponent <GridSystemManager>();

        buttonAlpha = changeAttackButtonTMP.transform.parent.GetComponent <Image>();
        var tempColor = buttonAlpha.color;

        tempColor.a       = 0.5f;
        buttonAlpha.color = tempColor;
    }
Esempio n. 3
0
 private void SetPositions(SnakeBlock block, GridNode node, GridSystemManager gridSystem, TraversalDirection dir)
 {
     if (block != null)
     {
         GridNode n = gridSystem.GetNextNode(node, dir);
         if (!n.isFilled)
         {
             block.SetPosition(n);
             SetPositions(block.backBlock, n, gridSystem, dir);
         }
     }
 }
Esempio n. 4
0
 // Start is called before the first frame update
 void Start()
 {
     gridManagerSCR = gridManager.GetComponent <GridSystemManager>();
     GetAllEnemies();
 }
Esempio n. 5
0
 public void SetPosition(GridNode node, GridSystemManager gridSystem, TraversalDirection dir)
 {
     SetPositions(headBlock, node, gridSystem, dir);
 }