コード例 #1
0
 private void Awake()
 {
     controls = new PlayerControl();
     controls.Enable();
     controls.Gameplay.Yoyo.performed         += ctx => Dash();
     controls.Gameplay.Attack.performed       += ctx => MeleAttack();
     controls.Gameplay.Utilitaire1.performed  += ctx => UseSlotInventory();
     controls.Gameplay.ChangeWeapon.performed += ctx => SwitchWeapon();
     controls.Gameplay.Menu.performed         += ctx => manag.MenuPause();
     controls.Gameplay.Move.performed         += ctx => inputDirMove = ctx.ReadValue <Vector2>();
     controls.Gameplay.Move.canceled          += ctx => inputDirMove = Vector2.zero;
     GetComponent <Health>().OnDie.AddListener(Die);
     anim     = GetComponentInChildren <Animator>();
     rb       = GetComponent <Rigidbody>();
     particle = GetComponentInChildren <ParticleSystem>();
     manag    = FindObjectOfType <LevelManager>();
     loader   = FindObjectOfType <ProgressSceneLoader>();
     tuto     = FindObjectOfType <TuToManager>();
 }
コード例 #2
0
ファイル: SkipIntro.cs プロジェクト: Jaggerjoe/ForRagnar
 // Start is called before the first frame update
 void Start()
 {
     anim  = GetComponent <Animator>();
     manag = FindObjectOfType <TuToManager>();
 }