Beispiel #1
0
 void TargetChgEvent(CharacterEventType evtType, Character self)
 {
     if (evtType != CharacterEventType.OnTargetChg)
     {
         return;
     }
     TargetCircle.Instance.SetTarget(self.GetTarget());
 }
Beispiel #2
0
        // Use this for initialization
        private void Start()
        {
            manager = GetComponentInParent <BattleManager>();
            var names = Enum.GetNames(typeof(CharacterEventType));

            foreach (var name in names)
            {
                CharacterEventType p;
                CharacterEventType.TryParse(name, true, out p);
                _eventMap.Add(p, new List <CardAction <System.Object, System.Object> >());
            }
        }
Beispiel #3
0
        void OnCharacterEvent(CharacterEventType e)
        {
            switch (e)
            {
            case CharacterEventType.GroundContactLost:
                animator.SetBool("IsGrounded", false);
                break;

            case CharacterEventType.GroundContactRegained:
                animator.SetBool("IsGrounded", true);
                break;

            default:
                break;
            }
        }
Beispiel #4
0
 public CharacterEvent(CharacterEventType _type, Character _character)
 {
     type      = _type;
     character = _character;
 }
 public static string GetEventKey(int entityID, CharacterEventType EventType)
 {
     return(entityID + EventType.ToString());
 }
Beispiel #6
0
 public void AddEvent(CharacterEventType eventType, CardAction <System.Object, System.Object> action)
 {
     ((List <CardAction <object, object> >)_eventMap[eventType]).Add(action);
 }
Beispiel #7
0
 public List <CardAction <System.Object, System.Object> > GetEventList(CharacterEventType eventType)
 {
     return((List <CardAction <object, object> >)_eventMap[eventType]);
 }