void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
            DontDestroyOnLoad(gameObject);

            SetDefaultBindings();
        }
    }
Beispiel #2
0
 private void addTestInputManagerStep()
 {
     AddStep("Add InputManager", () =>
     {
         testInputManager = new TestInputManager();
         Add(testInputManager);
         state    = testInputManager.CurrentState;
         mouse    = state.Mouse.Buttons;
         keyboard = state.Keyboard.Keys;
         joystick = state.Joystick.Buttons;
     });
 }
Beispiel #3
0
        protected override void Initialize()
        {
            // hookataan input manageri että ei tarvi joka pelissä erikseen :)
            gameStateManager = new GameStateManager(this);
            InputManager inputManager = new InputManager(this);

            InputManager = new TestInputManager(this);
            Components.Add(InputManager);
            Components.Add(inputManager);
            Components.Add(gameStateManager);

            base.Initialize();
        }
 void Start()
 {
     SetCharacterStatus();
     //uiManager = GameObject.FindWithTag("UIManager").GetComponent<UIManager>();
     animator         = GetComponent <Animator> ();
     this.CharAudio   = this.gameObject.GetComponent <AudioSource> ();
     state            = CharacterState.Idle;
     rigdbody         = GetComponent <Rigidbody> ();
     enermy           = GameObject.FindGameObjectsWithTag("Enermy");
     testinput        = GameObject.Find("TestInputManager").GetComponent <TestInputManager> ();
     charDir          = true;
     JumpMove         = false;
     weapon           = this.gameObject.GetComponentInChildren <CharWeapon> ();
     CharAudio.volume = 0.3f;
     jumpPower        = 10;
     comboCount       = 0;
     SetClassObject();
     //StartCoroutine (MoveSoundCol ());
 }