/// <summary> /// Start this instance. /// </summary> void Start() { this._myObject = gameObject; this._myTransform = transform; this._health = new HumanoidHealth (this._myTransform.FindChild("HealthText").GetComponent<TextMesh>()); this._fsm = new HumanoidStateMachine (this._myTransform, this._humanoidType, this._behaviour, this._health.CurrentHealth); this._ragdoll = (GameObject)Resources.Load ("Ragdolls/RagdollHumanoidRed"); this._energyItem = (GameObject)Resources.Load ("Items/EnergyItem"); }
/// <summary> /// Start this instance. /// </summary> void Start() { this._myObject = gameObject; this._myTransform = transform; this._health = new HumanoidHealth(this._myTransform.FindChild("HealthText").GetComponent<TextMesh>()); this._fsm = new HumanoidStateMachine(this._myTransform, this._humanoidType, this._behaviour, this._health.CurrentHealth); this._ragdoll = (GameObject)Resources.Load("Ragdolls/RagdollHumanoidRed"); this._energyItem = (GameObject)Resources.Load("Items/EnergyItem"); if (_myTransform.animation.GetClipCount() == 0) { _myTransform.animation.AddClip((AnimationClip)Resources.Load("Animations/run"), "run"); } }