Exemplo n.º 1
0
		public DelayedEvent(Skill fsm, SkillEvent fsmEvent, float delay)
		{
			this.fsm = fsm;
			this.timer = delay;
			this.fsmEvent = fsmEvent;
			this.eventData = new SkillEventData(Skill.EventData)
			{
				SentByFsm = SkillExecutionStack.ExecutingFsm,
				SentByState = SkillExecutionStack.ExecutingState,
				SentByAction = SkillExecutionStack.ExecutingAction
			};
		}
Exemplo n.º 2
0
		public void Update()
		{
			this.timer -= Time.get_deltaTime();
			if (this.timer < 0f)
			{
				SkillEventData fsmEventData = Skill.EventData;
				Skill.EventData = this.eventData;
				if (this.eventTarget == null)
				{
					this.fsm.Event(this.fsmEvent);
				}
				else
				{
					this.fsm.Event(this.eventTarget, this.fsmEvent);
				}
				this.fsm.UpdateStateChanges();
				this.eventFired = true;
				this.eventData = null;
				Skill.EventData = fsmEventData;
			}
		}
Exemplo n.º 3
0
 public SkillEventData(SkillEventData source)
 {
     this.SentByFsm          = source.SentByFsm;
     this.SentByState        = source.SentByState;
     this.SentByAction       = source.SentByAction;
     this.BoolData           = source.BoolData;
     this.IntData            = source.IntData;
     this.FloatData          = source.FloatData;
     this.Vector2Data        = source.Vector2Data;
     this.Vector3Data        = source.Vector3Data;
     this.StringData         = source.StringData;
     this.QuaternionData     = source.QuaternionData;
     this.RectData           = source.RectData;
     this.ColorData          = source.ColorData;
     this.ObjectData         = source.ObjectData;
     this.GameObjectData     = source.GameObjectData;
     this.MaterialData       = source.MaterialData;
     this.TextureData        = source.TextureData;
     this.Player             = source.Player;
     this.DisconnectionInfo  = source.DisconnectionInfo;
     this.ConnectionError    = source.ConnectionError;
     this.NetworkMessageInfo = source.NetworkMessageInfo;
     this.MasterServerEvent  = source.MasterServerEvent;
 }