/// <summary> /// Start is called on the frame when a script is enabled just before /// any of the Update methods is called the first time. /// </summary> public override void Start() { cData = GetComponent <CharacterData>(); animator = GetComponent <Animator>(); soundManager = GetComponent <CharacterSoundManager>(); OnLadder = false; Dashing = false; base.Start(); }
private void Start() { // external finds m_TileMaster = FindObjectOfType <TileMaster>(); m_GameManager = FindObjectOfType <GameManager>(); // things that belong to me m_Master = transform.root.GetComponent <CharacterMaster>(); m_Sound = transform.root.GetComponent <CharacterSoundManager>(); m_Renderer = GetComponent <Renderer>(); myTag = transform.root.tag; }
protected virtual void Awake() { // Capturing Interactive GameObjects textEvent1 = GameObject.Find("TextEvent1"); textEvent2 = GameObject.Find("TextEvent2"); panelEnemy = GameObject.Find("PanelEnemy"); panelHero = GameObject.Find("PanelHero"); canThrow = true; canShoot = true; characterSM = GetComponent <CharacterSoundManager>(); }
private void Start() { _master = GetComponent <CharacterMaster>(); _input = GetComponent <CharacterInput>(); _sounds = GetComponent <CharacterSoundManager>(); _keys = new Dictionary <Direction, Key> { [Direction.Up] = new Key(_input.upKey, Direction.Up, Vector3.left, Vector3.forward, () => left.transform.position), [Direction.Left] = new Key(_input.leftKey, Direction.Left, Vector3.back, Vector3.left, () => down.transform.position), [Direction.Down] = new Key(_input.downKey, Direction.Down, Vector3.right, Vector3.back, () => right.transform.position), [Direction.Right] = new Key(_input.rightKey, Direction.Right, Vector3.forward, Vector3.right, () => up.transform.position), }; _currentTile = getTile(); _currentTile.isOccupied = true; }
void Start() { superParent = Utils.GetSuperParent(transform).gameObject; manager = superParent.GetComponent <CharacterSoundManager>(); }