void Start() { controls = FindObjectOfType <PlayerController>().Controls; reticle = GetComponentInChildren <Reticle>(); controls.Digger.DigAction.performed += HandleDiggerActionPerformed; }
void Start() { isAlive = true; score = GameObject.FindGameObjectWithTag ("Score").GetComponent<Score> (); gameplayControls = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameplayControls>(); soundControls = GameObject.FindGameObjectWithTag("SoundsController").GetComponent<SoundControls>(); }
void Start() { isAlive = true; score = GameObject.FindGameObjectWithTag("Score").GetComponent <Score> (); gameplayControls = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameplayControls>(); soundControls = GameObject.FindGameObjectWithTag("SoundsController").GetComponent <SoundControls>(); }
private void Awake() { sword = GameObject.Find("MagicSword_Ice"); if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } gameplayControls = new GameplayControls(); Cursor.visible = false; Cursor.lockState = CursorLockMode.None; }
private void Awake() { if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; DontDestroyOnLoad(gameObject); } gameplayControls = new GameplayControls(); Cursor.visible = false; gameplayControls.MainGameplayControls.Pause.started += ctx => PausePushed(); gameplayControls.MainGameplayControls.Pause.canceled += ctx => PauseReleased(); }
void Awake() { Controls = new GameplayControls(); EnableDigControls(); EnableDuelControls(); Controls.Digger.Move.started += OnDiggerMoveStart; Controls.Digger.Move.canceled += OnDiggerMoveCancel; Controls.Digger.Jump.started += OnDiggerJumpStart; Controls.Digger.Jump.canceled += OnDiggerJumpCancel; Controls.Fighter.Move.started += OnFighterMoveStart; Controls.Fighter.Move.canceled += OnFighterMoveCancel; Controls.Fighter.Jump.started += OnFighterJumpStart; Controls.Fighter.Jump.canceled += OnFighterJumpCancel; Character.OnCharacterSpawned += OnCharacterSpawned; Character.OnCharacterKilled += OnCharacterKilled; }
private void Awake() { _controls = new GameplayControls(); }
void Awake() { // Register the singleton if (Instance != null) { Debug.LogError("Multiple instances of GameplayControls!"); } Instance = this; }