Exemplo n.º 1
0
    void Start()
    {
        controls = FindObjectOfType <PlayerController>().Controls;
        reticle  = GetComponentInChildren <Reticle>();

        controls.Digger.DigAction.performed += HandleDiggerActionPerformed;
    }
Exemplo n.º 2
0
 void Start()
 {
     isAlive = true;
     score = GameObject.FindGameObjectWithTag ("Score").GetComponent<Score> ();
     gameplayControls = GameObject.FindGameObjectWithTag("GameController").GetComponent<GameplayControls>();
     soundControls = GameObject.FindGameObjectWithTag("SoundsController").GetComponent<SoundControls>();
 }
Exemplo n.º 3
0
 void Start()
 {
     isAlive          = true;
     score            = GameObject.FindGameObjectWithTag("Score").GetComponent <Score> ();
     gameplayControls = GameObject.FindGameObjectWithTag("GameController").GetComponent <GameplayControls>();
     soundControls    = GameObject.FindGameObjectWithTag("SoundsController").GetComponent <SoundControls>();
 }
Exemplo n.º 4
0
 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();
    }
Exemplo n.º 6
0
    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;
    }
Exemplo n.º 7
0
 private void Awake()
 {
     _controls = new GameplayControls();
 }
Exemplo n.º 8
0
    void Awake()
    {
        // Register the singleton
        if (Instance != null)
        {
            Debug.LogError("Multiple instances of GameplayControls!");
        }

        Instance = this;
    }