示例#1
0
 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();
         }
     }
 }
    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
 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
 private void Awake()
 {
     this.rb           = GetComponent <Rigidbody>();
     this.grapplingGun = GetComponent <GrapplingGun>();
 }
示例#8
0
 void LateStart()
 {
     gun1Access = GunComponent(gun1);
     gun2Access = GunComponent(gun2);
 }