Exemplo n.º 1
0
    private new void Awake()
    {
        base.Awake();
        pTimeLayer = transform.GetComponentInParent <TimeLayer>();
        Debug.Log("Enemy Name : " + gameObject.name + "  Layer : " + pTimeLayer.transform.name);
        anim = GetComponent <AnimationBase>();

        skeletonGhost = GetComponentInChildren <SkeletonGhost> ();

        InitStates();
        SetStatesLevel();
        AddStateToListWithCheckingOverlap(GetStateLayerKey(defaultState));
        InitEnemy();
        GetSpecifiedState <DetectionState> (State.Detection).isDetection = false;
    }
Exemplo n.º 2
0
 private void OnEvent(AnimationState state, int trackIndex, Event e)
 {
     if (e.Data.Name == "Ghosting")
     {
         this.ghostingEnabled = (e.Int > 0);
         if (e.Float > 0f)
         {
             this.spawnRate = e.Float;
         }
         if (e.String != null)
         {
             this.color = SkeletonGhost.HexToColor(e.String);
         }
     }
 }