コード例 #1
0
 private void Awake()
 {
     pauseAction = new InputMaster();
 }
コード例 #2
0
 private void Awake()
 {
     controls = new InputMaster();
     controls.Player.Jump.performed     += _ => Jump();
     controls.Player.Interact.performed += _ => Interact();
 }
コード例 #3
0
 private void Awake()
 {
     controls = new InputMaster();
 }
コード例 #4
0
ファイル: InputMaster.cs プロジェクト: Oscar16A/Alapca-Island
 public PlayerActions(InputMaster wrapper)
 {
     m_Wrapper = wrapper;
 }
コード例 #5
0
 private void Start()
 {
     playerInput = gmManager.playerInput;
     health      = playerUnit.health;
     speed       = playerUnit.speed;
 }
コード例 #6
0
ファイル: MenuScript.cs プロジェクト: limiteddata/CubeColor
 private void Awake()
 {
     inputActions = new InputMaster();
     inputActions.New_UI.LeftClick.performed += ctx => onClick();
     inputActions.New_UI.Move.performed      += ctx => onMove();
 }
コード例 #7
0
 public override void Interact(CharController actor)
 {
     this.input = actor.InputMaster;
     actor.EnterVehicle(this);
 }
コード例 #8
0
 public GeneralActions(InputMaster wrapper)
 {
     m_Wrapper = wrapper;
 }
コード例 #9
0
 public CEditorActions(InputMaster wrapper)
 {
     m_Wrapper = wrapper;
 }
コード例 #10
0
 private void Awake()
 {
     controls = new InputMaster();
     controls.Player.Load.performed += _ => LoadFightQuest();
 }
コード例 #11
0
 // Start is called before the first frame update
 private void Awake()
 {
     controls = new InputMaster();
     controls.Player.PickUpObject.performed += context => PickUpObject();
     controls.Player.UseObject.performed    += context => UseObject();
 }
コード例 #12
0
ファイル: InputManager.cs プロジェクト: rjga94/gdhq-jam-unity
 private void Awake()
 {
     _input   = new InputMaster();
     Gameplay = _input.Gameplay;
     Cutscene = _input.Cutscene;
 }
コード例 #13
0
 public UIActions(InputMaster wrapper)
 {
     m_Wrapper = wrapper;
 }
コード例 #14
0
ファイル: Pausemenu.cs プロジェクト: MARomain/adam
 private void Awake()
 {
     controls = new InputMaster();
     controls.Player.Pause.performed += ctx => Pausebutton();
 }
コード例 #15
0
 public void RegisterInputs(InputMaster inputSystemAssetScript)
 {
     inputSystemAssetScript.General.Interact.performed += CallInteractionWithWorld;
     inputSystemAssetScript.General.CancelOperationOrPauseGame.performed += CallTerminateBuild;
 }
コード例 #16
0
 private void Awake()
 {
     controls = new InputMaster();
     controls.Player.Click.started  += _ => OnDragStart();
     controls.Player.Click.canceled += _ => OnDragEnd();
 }
コード例 #17
0
 // Start is called before the first frame update
 void Awake()
 {
     _controlInput = new InputMaster();
 }
コード例 #18
0
 public void Start()
 {
     controls = new InputMaster();
     startDialogue.TriggerDialogue();
     timeCoroutine = Timer();
 }
コード例 #19
0
ファイル: ReloatTimerUI.cs プロジェクト: salty3/Tanchiki
 private void Awake()
 {
     _inputMaster = new InputMaster();
     _mainCam     = Camera.main;
 }
コード例 #20
0
 void Awake()
 {
     controls = new InputMaster();
     controls.Enable();
 }
コード例 #21
0
 public abstract void Controll(InputMaster inputs);
コード例 #22
0
    private void Awake()
    {
        Instance = this;

        inputMaster = new InputMaster();
        inputMaster.PlayerControlls.AimInput.performed += act =>
        {
            if (block)
            {
                return;
            }
            block = true;

            if (!aiming)
            {
                aiming = Controller.Instance.playerState != PlayerState.ATTACK;
            }
            else
            {
                aiming = false;
            }
        };

        inputMaster.PlayerControlls.CombatInputs.performed += act =>
        {
            if (block)
            {
                return;
            }
            block = true;

            if (aiming && Input.GetMouseButtonDown(0))
            {
                if (timer > guns[2].delayPerShot)
                {
                    timer = 0;
                    guns[2].gun.GetComponent <Bow>().Shot();
                }
                return;
            }

            if (!onAttack && Controller.Instance.playerState != PlayerState.FALL)
            {
                if (!FuryControll.Instance.furyState)
                {
                    if (hits == 0)
                    {
                        playerAnimator.SetTrigger("Attack");
                        playerAnimator.ResetTrigger("Shot");
                    }
                }
                else
                {
                    if (hits == 0 && FuryControll.Instance.furyState)
                    {
                        playerAnimator.SetTrigger("Assassinate");
                        playerAnimator.ResetTrigger("Shot");
                    }
                }
            }
        };

        inputMaster.PlayerControlls.ShootInputs.performed += act =>
        {
            if (block)
            {
                return;
            }
            block = true;

            if (!aiming)
            {
                timer = 0;
                Shot();
                return;
            }

            if (aiming && !Input.GetMouseButtonDown(1))
            {
                if (timer > guns[2].delayPerShot)
                {
                    timer = 0;
                    guns[2].gun.GetComponent <Bow>().Shot();
                }
            }
        };
    }
コード例 #23
0
ファイル: Rocket.cs プロジェクト: magswag/Slingshot
 private void Awake()
 {
     inputMaster = new InputMaster();
 }
コード例 #24
0
 void SetUpInputs()
 {
     inputMaster = new InputMaster();
 }
コード例 #25
0
 // Update is called once per frame
 private void Awake()
 {
     controls = new InputMaster();
     //controls.Player.Movement.performed += context => Move(context.ReadValue<Vector2>());
 }
コード例 #26
0
 public void Awake()
 {
     input = new InputMaster();
     input.Enable();
     input.GameManager.ReloadScene.performed += context => ReloadScene();
 }
コード例 #27
0
ファイル: ConsumableItem.cs プロジェクト: TSKsmiley/RedDead2D
 public override void Use(InputMaster _playerInput, GameObject _caller)
 {
     Debug.Log("consumable");
     ApplyHealthRegen(_caller.GetComponent <PlayerController>());
 }
コード例 #28
0
 public void UnRegisterInputs(InputMaster inputSystemAssetScript)
 {
     //throw new NotImplementedException();
 }
コード例 #29
0
 private void Awake()
 {
     input = new InputMaster();
     input.Enable();
 }
コード例 #30
0
    private void Awake()
    {
        // Make new controls object so the script can recieve input
        controls = new InputMaster();

        // Get the rigid body component from this game object
        rb = GetComponent <Rigidbody>();
        if (rb == null)
        {
            Debug.Log("Missing Rigidbody component on BoatController script!");
        }

        // Get the boat animator
        boatAnimator = transform.Find("Graphics").GetComponent <Animator>();
        if (boatAnimator == null)
        {
            Debug.Log("Missing Animator component on object: " + transform.Find("Graphics").gameObject);
        }

        #region Particles

        // Get the particles object
        Transform particlesTransform = transform.Find("Particles");
        if (particlesTransform == null)
        {
            Debug.Log("Particles child object missing from object: " + this.gameObject);
        }
        else
        {
            // Get the boat side trails left particles
            boatSideTrailsLeft = particlesTransform.Find("BoatSideTrailsLeft").GetComponent <ParticleSystem>();
            if (boatSideTrailsLeft == null)
            {
                Debug.Log("Missing BoatSideTrailsLeft child on object: " + particlesTransform.gameObject);
            }

            // Get the boat side trails right particles
            boatSideTrailsRight = particlesTransform.Find("BoatSideTrailsRight").GetComponent <ParticleSystem>();
            if (boatSideTrailsRight == null)
            {
                Debug.Log("Missing BoatSideTrailsRight child on object: " + particlesTransform.gameObject);
            }

            // Get Bow bubbles particles
            bowBubbles = particlesTransform.Find("BowBubbles").GetComponent <ParticleSystem>();
            if (bowBubbles == null)
            {
                Debug.Log("Missing BowBubbles child on object: " + particlesTransform.gameObject);
            }
        }

        #endregion

        #region Audio

        Transform audioObjectTrasform = transform.Find("Audio");
        if (audioObjectTrasform == null)
        {
            Debug.Log("Missing Audio child on object: " + gameObject);
        }
        else
        {
            // Get the dash sound
            dashNoise = audioObjectTrasform.Find("DashNoise").GetComponent <AudioSource>();
            if (dashNoise == null)
            {
                Debug.Log("Missing DashNoise child on object: " + audioObjectTrasform.gameObject);
            }

            // Get the water on boat noise
            waterOnBoatNoise = audioObjectTrasform.Find("WaterOnBoatNoise").GetComponent <AudioSource>();
            if (waterOnBoatNoise == null)
            {
                Debug.Log("Missing WaterOnBoatNoise child on object: " + audioObjectTrasform.gameObject);
            }
        }


        #endregion
    }