Exemplo n.º 1
0
 void Teleporter_PlayheadWrap(DisplayObjectContainer sender)
 {
     this.PlayheadWrap -= new V2DRuntime.Display.AnimationEvent(Teleporter_PlayheadWrap);
     for (int i = 0; i < node.Length; i++)
     {
         node[i].GotoAndStop(0);
     }
 }
Exemplo n.º 2
0
        public virtual DisplayObject AddInstance(V2DInstance inst, DisplayObjectContainer parent)
        {
            DisplayObject result = null;

            if (inst != null)
            {
                V2DDefinition def = screen.v2dWorld.GetDefinitionByName(inst.DefinitionName);
                if (def != null)
                {
                    Texture2D namedTexture = screen.GetTexture(def.LinkageName);
                    inst.Definition = def;

                    if (inst.InstanceName == V2DGame.currentRootName)
                    {
                        result = this;
                    }
                    else
                    {
                        result = parent.SetFieldWithReflection(namedTexture, inst);

                        if (result == null)
                        {
                            result = screen.CreateDefaultObject(namedTexture, inst);
                        }
                        parent.AddChild(result);
                    }
                }
                else
                {
                    result = parent.SetFieldWithReflection(texture, inst);
                    if (result == null)
                    {
                        result = screen.CreateDefaultObject(texture, inst);
                    }
                    parent.AddChild(result);
                }
            }

            return(result);
        }
Exemplo n.º 3
0
 void win_PlayheadWrap(DisplayObjectContainer sender)
 {
     targetAnim.PlayheadWrap -= new V2DRuntime.Display.AnimationEvent(win_PlayheadWrap);
     levelOver = true;
     targetAnim.GotoAndStop(targetAnim.FrameCount - 1);
 }
Exemplo n.º 4
0
 void OnEndDieSequence(DisplayObjectContainer sender)
 {
     sender.PlayheadWrap -= new AnimationEvent(OnEndDieSequence);
     sender.Stop();
     sender.DestroyAfterUpdate();
 }
 void head_PlayheadWrap(DisplayObjectContainer sender)
 {
     headPlayerState = HeadPlayerState.Normal;
     head.GotoAndStop(0);
     playerBody.GotoAndStop(0);
     this.DestroyAfterUpdate();
 }
Exemplo n.º 6
0
 void di_PlayheadWrap(DisplayObjectContainer sender)
 {
     sender.PlayheadWrap -= new AnimationEvent(di_PlayheadWrap);
     sender.DestroyAfterUpdate();
     CheckRoundOver();
 }
		public virtual DisplayObject AddInstance(V2DInstance inst, DisplayObjectContainer parent)
		{
			DisplayObject result = null;
			if (inst != null)
			{
				V2DDefinition def = screen.v2dWorld.GetDefinitionByName(inst.DefinitionName);
				if (def != null)
				{
					Texture2D namedTexture = screen.GetTexture(def.LinkageName);
					inst.Definition = def;

					if (inst.InstanceName == CurrentRootName)
					{
						result = this;
					}
					else
					{
						result = parent.SetFieldWithReflection(namedTexture, inst);

						if (result == null)
						{
							result = screen.CreateDefaultObject(namedTexture, inst);
						}
						parent.AddChild(result);
					}
				}
				else
				{
					result = parent.SetFieldWithReflection(texture, inst);
					if (result == null)
					{
						result = screen.CreateDefaultObject(texture, inst);
					}
					parent.AddChild(result);
				}
			}

			return result;
		}