void Start() { if (Network.isClient) return; life = gameObject.GetComponentInChildren<Life>(); life.addDieCallback(deadAction); }
void Awake() { life = gameObject.GetComponentInChildren<Life>(); life.addDieCallback(deadAction); }
void Awake() { life = gameObject.GetComponentInChildren<Life>(); life.addDieCallback(deadAction); animationToPlay[animationName].layer = animationStateLayer; }
void Start() { if (!myAnimation) myAnimation = GetComponentInChildren<Animation>(); if (!_actionEnergyValue) { var lActionEnergyValue = gameObject.AddComponent<ActionEnergyValue>(); lActionEnergyValue.addValueChangedReceiver(nullValueChangedReceiver); actionEnergyValue = lActionEnergyValue; } life = GetComponentInChildren<Life>(); //life.setDieCallback(deadAction); life.addDieCallback(deadAction); if (!reverseObjectTransform) reverseObjectTransform = transform; Xscale = Mathf.Abs(reverseObjectTransform.localScale.x); emitter.setBulletLayer(getBulletLayer()); UpdateFaceShow(); }
void Start() { if (!characterAnimation) characterAnimation = GetComponentInChildren<Animation>(); emitter = GetComponentInChildren<Emitter>(); life = GetComponentInChildren<Life>(); //if (!actionCommandControl) // actionCommandControl = GetComponentInChildren<ActionCommandControl>(); life.addDieCallback(deadAction); //collisionLayer.addCollider(gameObject); turnObjectTransform = transform.Find("turn").transform; reverseObjectTransform = transform.Find("reverse").transform; Xscale = reverseObjectTransform.localScale.x; if (emitter) emitter.setBulletLayer(getBulletLayer()); UpdateFaceShow(); }
void Awake() { bulletRigidbody = gameObject.GetComponent<Rigidbody>(); bulletLife = gameObject.GetComponent<Life>(); bulletLife.addDieCallback(lifeEndImp); }