void Start()
 {
     if (Network.isClient)
         return;
     life = gameObject.GetComponentInChildren<Life>();
     life.addDieCallback(deadAction);
 }
예제 #2
0
 void Awake()
 {
     life = gameObject.GetComponentInChildren<Life>();
     life.addDieCallback(deadAction);
 }
 void Awake()
 {
     life = gameObject.GetComponentInChildren<Life>();
     life.addDieCallback(deadAction);
     animationToPlay[animationName].layer = animationStateLayer;
 }
예제 #4
0
    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();
    }
예제 #5
0
    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();
    }
예제 #6
0
 void Awake()
 {
     bulletRigidbody = gameObject.GetComponent<Rigidbody>();
     bulletLife = gameObject.GetComponent<Life>();
     bulletLife.addDieCallback(lifeEndImp);
 }