private void Awake() { this.moveArrows = GetComponentsInChildren <MoveArrows>(); this.grow = GetComponentInChildren <GrowWipeTail>(); this.initialPosition = this.transform.position; this.effectsPool = GetComponentInParent <EffectsPool>(); MarkSelfAsAvailable(); }
private void Awake() { this.gridManager = GetComponent <GridManager>(); this.matchManager = GetComponent <MatchManager>(); this.tokenMovement = GetComponent <TokenMovementManager>(); this.highlighter = this.highlight.GetComponent <Highlighter>(); this.effectsPool = GetComponent <EffectsPool>(); this.currentState.SetMainComponentsInAllStates(this, this.gridManager, this.matchManager, this.tokenMovement, this.highlighter, this.effectsPool); DOTween.Clear(); }
public void SetMainComponents(GameMaster aGameMaster, GridManager aGridManager = null, MatchManager aMatchManager = null, TokenMovementManager aTokenMovementManager = null, Highlighter aHighlighter = null, EffectsPool anEffectsPool = null ) { this.theGameMaster = aGameMaster; this.gridManager = aGridManager; this.matchManager = aMatchManager; this.tokenMovement = aTokenMovementManager; this.highlighter = aHighlighter; this.effectsPool = anEffectsPool; }
public void SetMainComponentsInAllStates(GameMaster aGameMaster, GridManager aGridManager = null, MatchManager aMatchManager = null, TokenMovementManager aTokenMovementManager = null, Highlighter aHighlighter = null, EffectsPool anEffectsPool = null ) { foreach (StateNames state in Enum.GetValues(typeof(StateNames))) { if (this.statesDictionary.GetState(state) != null) { SOState aStateInDictionary = this.statesDictionary.GetState(state); aStateInDictionary.SetMainComponents(aGameMaster, aGridManager, aMatchManager, aTokenMovementManager, aHighlighter, anEffectsPool); } } }
// Use this for initialization void Awake() { instace = this; Initialize(); }
// Unity methods private void Awake() { body2D = GetComponent <Rigidbody2D>(); effectsPool = GameObject.Find("EffectsPool").GetComponent <EffectsPool>(); } // End Unity method Awake
// Unity methods private void Start() { mySprite = gameObject.GetComponentInChildren <SpriteRenderer>(); effectsPool = GameObject.Find("EffectsPool").GetComponent <EffectsPool>(); } // End Unity method Start