void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); } }
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; }
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); } } }
// Start is called before the first frame update void Start() { gridManagerSCR = gridManager.GetComponent <GridSystemManager>(); GetAllEnemies(); }
public void SetPosition(GridNode node, GridSystemManager gridSystem, TraversalDirection dir) { SetPositions(headBlock, node, gridSystem, dir); }