コード例 #1
0
ファイル: GameManager.cs プロジェクト: jtwsmeal/Chronospace
 private void Awake()
 {
     Time.timeScale = 1f;
     playerControl  = FindObjectOfType <PlayerControl>();
     grapplingGun   = playerControl.gameObject.GetComponentInChildren <GrapplingGun>();
     pauseMenu      = FindObjectOfType <PauseMenu>();
     soundManager   = FindObjectOfType <SoundManager>();
 }
コード例 #2
0
 private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
コード例 #3
0
 private void OnTriggerEnter(Collider other)
 {
     // If the player hits a level boundary, kill them.
     if (other.tag == "Player")
     {
         grapplingGun = FindObjectOfType <GrapplingGun>();
         if (!grapplingGun.isGrapping())
         {
             gameManager.KillPlayer();
         }
     }
 }
コード例 #4
0
    void Awake()
    {
        physics         = GetComponent <PlayerPhysics>();
        controller      = GetComponent <PlayerController>();
        grapplingGun    = GetComponent <GrapplingGun>();
        attackbehaviour = GetComponent <AttackBehaviour>();
        deadbehaviour   = GetComponent <DeadBehaviour>();

        physics.player = this;

        controller.physics         = physics;
        controller.grapplingGun    = grapplingGun;
        controller.attackBehaviour = attackbehaviour;
        controller.deadbehaviour   = deadbehaviour;

        grapplingGun.physics = physics;

        attackbehaviour.physics = physics;
    }
コード例 #5
0
ファイル: RotateGun.cs プロジェクト: Sicerat/Wandering-3
 private void Start()
 {
     grappling = (GrapplingGun)GetComponentInParent <WeaponTemplate>().altFire;
 }
コード例 #6
0
 // Start is called before the first frame update
 void Start()
 {
     gun = GameObject.FindGameObjectWithTag("Player").GetComponent <GrapplingGun>();
 }
コード例 #7
0
ファイル: MovementHandler.cs プロジェクト: lazackna/CAA-game
 private void Awake()
 {
     this.rb           = GetComponent <Rigidbody>();
     this.grapplingGun = GetComponent <GrapplingGun>();
 }
コード例 #8
0
 void LateStart()
 {
     gun1Access = GunComponent(gun1);
     gun2Access = GunComponent(gun2);
 }