コード例 #1
0
 public SpawnOnEvent(ActionStateEvents startEvent, ActionStateEvents endEvent, bool parent, PrefabEntity prefab)
 {
     StartEvent = startEvent;
     EndEvent   = endEvent;
     Prefab     = prefab;
     Parent     = parent;
 }
コード例 #2
0
ファイル: ScriptingSystem.cs プロジェクト: Peng2017/Framework
 public CameraShakeEvent(ActionStateEvents state, Vector3 force, int frames, bool isRotation)
 {
     Event      = state;
     Force      = force;
     Frames     = frames;
     IsRotation = isRotation;
 }
コード例 #3
0
 public WaitForAnimation(ActionStateEvents statEvent, string animationClip, bool onEvent, bool onComplete)
 {
     _animationClip = animationClip;
     _onEvent       = onEvent;
     _onComplete    = onComplete;
     StateEvent     = statEvent;
 }
コード例 #4
0
ファイル: ActionLayer.cs プロジェクト: Peng2017/Framework
        public void PostAnimationEvent(ActionUsingNode node, string eventName)
        {
            if (Events.TryGetValue(eventName, out var animationEvent))
            {
                animationEvent.Trigger(node, eventName);
            }
            ActionStateEvents state = AnimationEvents.ToStateEvent(eventName);

            if (state == ActionStateEvents.Activate)
            {
                node.Entity.Post(new ActionStateEvent(node.Entity, node.Entity, node.Animator.GetEventPosition, node.Animator.GetEventRotation, ActionStateEvents.Activate));
            }
            if (state == ActionStateEvents.None)
            {
                return;
            }
            var stateEvent = new ActionStateEvent(node.Entity, Action.GetEntity(), node.Animator.GetEventPosition, node.Animator.GetEventRotation, state);

            if (Action.Fx != null)
            {
                Action.Fx.TriggerEvent(stateEvent);
            }
            for (int i = 0; i < ScriptedEvents.Count; i++)
            {
                if (ScriptedEvents[i].Event != state)
                {
                    continue;
                }
                PostAnimationEvent(stateEvent);
                break;
            }
        }
コード例 #5
0
ファイル: SpawnOnEvent.cs プロジェクト: bmjoy/Framework-1
 public SpawnOnEvent(ActionStateEvents startEvent, ActionStateEvents endEvent, bool parent, GameObject prefab)
 {
     StartEvent = startEvent;
     EndEvent   = endEvent;
     Prefab     = prefab;
     Parent     = parent;
 }
コード例 #6
0
 public EventCheckRaycastCollision(ActionStateEvents stateEvent, float rayDistance, float raySize, bool limit)
 {
     RayDistance  = rayDistance;
     RaySize      = raySize;
     StateEvent   = stateEvent;
     LimitToEnemy = limit;
 }
コード例 #7
0
 public ActionStateEvent(CharacterNode origin, CharacterNode target, Vector3 position, Quaternion rotation, ActionStateEvents state)
 {
     Origin   = origin;
     Target   = target;
     Position = position;
     Rotation = rotation;
     State    = state;
 }
コード例 #8
0
 public ActionStateEvent(Entity origin, Entity focus, Vector3 position, Quaternion rotation, ActionStateEvents state)
 {
     Origin   = origin.FindNode <CharacterNode>();
     Target   = focus.FindNode <CharacterNode>();
     Position = position;
     Rotation = rotation;
     State    = state;
 }
コード例 #9
0
 public ActionStateEvent(Entity origin, Entity focus, Vector3 position, Quaternion rotation, ActionStateEvents state)
 {
     Origin   = origin;
     Focus    = focus;
     Position = position;
     Rotation = rotation;
     State    = state;
 }
コード例 #10
0
ファイル: CommandSequence.cs プロジェクト: bmjoy/Framework-1
 public void Post(Entity target, Vector3 position, Quaternion rotation, ActionStateEvents state)
 {
     if (state == ActionStateEvents.None)
     {
         return;
     }
     LastStateEvent = new ActionStateEvent(EntityOwner, target, position, rotation, state);
     Post(LastStateEvent.Value);
 }
コード例 #11
0
ファイル: ScriptingSystem.cs プロジェクト: Peng2017/Framework
        public static IActionScriptedEvent ParseMessage(ActionStateEvents stateEvent, string[] splitWords)
        {
            var param0 = splitWords.Length < 2 ? "" : splitWords[1];
            var param1 = splitWords.Length < 3 ? "" : splitWords[2];

            switch (splitWords[0].ToLower())
            {
            case "fov":
            case "zoom":
                return(new CameraFovShakeEvent(stateEvent, ParseUtilities.TryParse(param0, 5f), ParseUtilities.TryParse(param1, 4)));

            case "pitch":
            case "kick":
                return(new CameraShakeEvent(stateEvent, ParseUtilities.TryParse(param0, Vector3.up), ParseUtilities.TryParse(param1, 4), false));

            case "shake":
            case "rotate":
                return(new CameraShakeEvent(stateEvent, ParseUtilities.TryParse(param0, Vector3.up), ParseUtilities.TryParse(param1, 4), true));
            }
            return(null);
        }
コード例 #12
0
ファイル: AddChargeForce.cs プロジェクト: bmjoy/Framework-1
 public AddChargeForce(ActionStateEvents stateEvent)
 {
     StateEvent = stateEvent;
 }
コード例 #13
0
 public DetermineHitOrMiss(ActionStateEvents stateEvent)
 {
     StateEvent = stateEvent;
 }
コード例 #14
0
 public WaitForSpawnMovement(ActionStateEvents stateEvent)
 {
     StateEvent = stateEvent;
 }
コード例 #15
0
ファイル: ScriptingSystem.cs プロジェクト: Peng2017/Framework
 public CameraStateShakeEvent(ActionStateEvents state, int frames, bool isRotation)
 {
     Event      = state;
     Frames     = frames;
     IsRotation = isRotation;
 }
コード例 #16
0
 public GenerateCollisionEvent(ActionStateEvents stateEvent)
 {
     StateEvent = stateEvent;
 }
コード例 #17
0
ファイル: SpawnProjectile.cs プロジェクト: bmjoy/Framework-1
 public SpawnProjectile(ActionStateEvents stateEvent)
 {
     StateEvent = stateEvent;
 }
コード例 #18
0
ファイル: CommandSequence.cs プロジェクト: bmjoy/Framework-1
 public void PostAdvance(Entity target, Vector3 position, Quaternion rotation, ActionStateEvents state)
 {
     Post(target, position, rotation, state);
     Advance();
 }
コード例 #19
0
ファイル: ScriptingSystem.cs プロジェクト: Peng2017/Framework
 public CameraFovShakeEvent(ActionStateEvents @event, float force, int frames)
 {
     Event  = @event;
     Force  = force;
     Frames = frames;
 }
コード例 #20
0
 public EventSpawnProjectile(ActionStateEvents stateEvent, string data)
 {
     StateEvent = stateEvent;
     Data       = data;
 }
コード例 #21
0
ファイル: ScriptingSystem.cs プロジェクト: Peng2017/Framework
 public WaitEvent(ActionStateEvents @event, float waitTime, bool unscaled)
 {
     Event  = @event;
     _timer = new Timer(waitTime, unscaled);
 }
コード例 #22
0
ファイル: ScriptingSystem.cs プロジェクト: Peng2017/Framework
 public ActionScriptedSequence(ActionStateEvents @event, IActionScriptedEvent[] scriptedEvents)
 {
     Event          = @event;
     ScriptedEvents = scriptedEvents;
 }