示例#1
0
        public override void Run(Simulation.Actor actor)
        {
            var owner = actor.Owner;

            if (owner != null && !owner.IsReleased)
            {
                if (CheckInstance != null && CheckInstance.Length != 0)
                {
                    if (!owner.Variables.ContainsKey(CheckInstance) ||
                        owner.Variables[CheckInstance].Value as Simulation.Actor != actor)
                    {
                        actor.Release();
                        return;
                    }
                }

                actor.X = owner.X + owner.VX;
                actor.Y = owner.Y + owner.VY;

                if (!IgnoreRotation)
                {
                    actor.Rotation = owner.Rotation;
                }
            }
            else
            {
                actor.Release();
            }
        }
示例#2
0
 public override void Run(Simulation.Actor actor)
 {
     if (actor.Alpha < Value)
     {
         actor.Release();
     }
     else
     {
         actor.Alpha -= Value;
     }
 }
示例#3
0
 public override void Run(Simulation.Actor actor)
 {
     actor.Release();
 }