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; }
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); } } }