示例#1
0
        public void LeaveControl()
        {
            if (this.spaceShip != null)
            {
                this.spaceShip.engineOn = false;
                this.spaceShip.pitchOn  = 0;
                this.spaceShip.rollOn   = 0;
            }

            if (this.lightShip != null)
            {
                this.lightShip.engineOn                = false;
                this.lightShip.pitchOn                 = 0;
                this.lightShip.rollOn                  = 0;
                this.transform.parent                  = this.lightShip.transform.parent;
                this.cRigidbody.isKinematic            = false;
                this.GetComponent <Collider>().enabled = true;
                this.state       = HumanoidState.Stand;
                this.currentGrav = this.transform.parent.GetComponent <Gravity> ();
            }

            this.cRigidbody.isKinematic            = false;
            this.GetComponent <Collider>().enabled = true;

            this.seat               = null;
            this.spaceShip          = null;
            this.lightShip          = null;
            this.head.localRotation = Quaternion.identity;
            this.state              = HumanoidState.Stand;
        }
示例#2
0
		public void LeaveControl () {
			if (this.spaceShip != null) {
				this.spaceShip.engineOn = false;
				this.spaceShip.pitchOn = 0;
				this.spaceShip.rollOn = 0;
			}

			if (this.lightShip != null) {
				this.lightShip.engineOn = false;
				this.lightShip.pitchOn = 0;
				this.lightShip.rollOn = 0;
				this.transform.parent = this.lightShip.transform.parent;
				this.cRigidbody.isKinematic = false;
				this.GetComponent<Collider>().enabled = true;
				this.state = HumanoidState.Stand;
				this.currentGrav = this.transform.parent.GetComponent<Gravity> ();
			}

			this.cRigidbody.isKinematic = false;
			this.GetComponent<Collider>().enabled = true;

			this.seat = null;
			this.spaceShip = null;
			this.lightShip = null;
			this.head.localRotation = Quaternion.identity;
			this.state = HumanoidState.Stand;
		}
示例#3
0
 public void TakeControl(SpaceShip spaceShip, Transform seat)
 {
     this.seat      = seat;
     this.spaceShip = spaceShip;
     this.state     = HumanoidState.PilotMotherShip;
 }
示例#4
0
		public void TakeControl (SpaceShip spaceShip, Transform seat) {
			this.seat = seat;
			this.spaceShip = spaceShip;
			this.state = HumanoidState.PilotMotherShip;
		}