commit for merge fich for create StartCycledAnimation at AnimatedGraficsComponent
This commit is contained in:
parent
a4e877668b
commit
6b55b595c5
11 changed files with 116 additions and 84 deletions
|
@ -134,57 +134,84 @@
|
|||
#begin Textures/Animations/player_left_idle.animation
|
||||
/copy:Textures/Animations/player_left_idle.animation
|
||||
|
||||
#begin Textures/Animations/player_look_down.animation
|
||||
/copy:Textures/Animations/player_look_down.animation
|
||||
|
||||
#begin Textures/Animations/player_look_down_weapon.animation
|
||||
/copy:Textures/Animations/player_look_down_weapon.animation
|
||||
|
||||
#begin Textures/Animations/player_look_left.animation
|
||||
/copy:Textures/Animations/player_look_left.animation
|
||||
|
||||
#begin Textures/Animations/player_look_left_down.animation
|
||||
/copy:Textures/Animations/player_look_left_down.animation
|
||||
#begin Textures/Animations/player_look_down.animation
|
||||
/copy:Textures/Animations/player_look_down.animation
|
||||
|
||||
#begin Textures/Animations/player_look_left_down_weapon.animation
|
||||
/copy:Textures/Animations/player_look_left_down_weapon.animation
|
||||
|
||||
#begin Textures/Animations/player_look_left_up.animation
|
||||
/copy:Textures/Animations/player_look_left_up.animation
|
||||
#begin Textures/Animations/player_look_left_down.animation
|
||||
/copy:Textures/Animations/player_look_left_down.animation
|
||||
|
||||
#begin Textures/Animations/player_look_left_up_weapon.animation
|
||||
/copy:Textures/Animations/player_look_left_up_weapon.animation
|
||||
|
||||
#begin Textures/Animations/player_look_left_up.animation
|
||||
/copy:Textures/Animations/player_look_left_up.animation
|
||||
|
||||
#begin Textures/Animations/player_look_left_weapon.animation
|
||||
/copy:Textures/Animations/player_look_left_weapon.animation
|
||||
|
||||
#begin Textures/Animations/player_look_right.animation
|
||||
/copy:Textures/Animations/player_look_right.animation
|
||||
|
||||
#begin Textures/Animations/player_look_right_down.animation
|
||||
/copy:Textures/Animations/player_look_right_down.animation
|
||||
#begin Textures/Animations/player_look_left.animation
|
||||
/copy:Textures/Animations/player_look_left.animation
|
||||
|
||||
#begin Textures/Animations/player_look_right_down_weapon.animation
|
||||
/copy:Textures/Animations/player_look_right_down_weapon.animation
|
||||
|
||||
#begin Textures/Animations/player_look_right_up.animation
|
||||
/copy:Textures/Animations/player_look_right_up.animation
|
||||
#begin Textures/Animations/player_look_right_down.animation
|
||||
/copy:Textures/Animations/player_look_right_down.animation
|
||||
|
||||
#begin Textures/Animations/player_look_right_up_weapon.animation
|
||||
/copy:Textures/Animations/player_look_right_up_weapon.animation
|
||||
|
||||
#begin Textures/Animations/player_look_right_up.animation
|
||||
/copy:Textures/Animations/player_look_right_up.animation
|
||||
|
||||
#begin Textures/Animations/player_look_right_weapon.animation
|
||||
/copy:Textures/Animations/player_look_right_weapon.animation
|
||||
|
||||
#begin Textures/Animations/player_look_up.animation
|
||||
/copy:Textures/Animations/player_look_up.animation
|
||||
#begin Textures/Animations/player_look_right.animation
|
||||
/copy:Textures/Animations/player_look_right.animation
|
||||
|
||||
#begin Textures/Animations/player_look_up_weapon.animation
|
||||
/copy:Textures/Animations/player_look_up_weapon.animation
|
||||
|
||||
#begin Textures/Animations/player_look_up.animation
|
||||
/copy:Textures/Animations/player_look_up.animation
|
||||
|
||||
#begin Textures/Animations/player_right_idle.animation
|
||||
/copy:Textures/Animations/player_right_idle.animation
|
||||
|
||||
#begin Textures/Animations/player_run_down.animation
|
||||
/copy:Textures/Animations/player_run_down.animation
|
||||
|
||||
#begin Textures/Animations/player_run_left_down.animation
|
||||
/copy:Textures/Animations/player_run_left_down.animation
|
||||
|
||||
#begin Textures/Animations/player_run_left_up.animation
|
||||
/copy:Textures/Animations/player_run_left_up.animation
|
||||
|
||||
#begin Textures/Animations/player_run_left.animation
|
||||
/copy:Textures/Animations/player_run_left.animation
|
||||
|
||||
#begin Textures/Animations/player_run_right_down.animation
|
||||
/copy:Textures/Animations/player_run_right_down.animation
|
||||
|
||||
#begin Textures/Animations/player_run_right_up.animation
|
||||
/copy:Textures/Animations/player_run_right_up.animation
|
||||
|
||||
#begin Textures/Animations/player_run_right.animation
|
||||
/copy:Textures/Animations/player_run_right.animation
|
||||
|
||||
#begin Textures/Animations/player_run_right.zip
|
||||
/copy:Textures/Animations/player_run_right.zip
|
||||
|
||||
#begin Textures/Animations/player_run_up.animation
|
||||
/copy:Textures/Animations/player_run_up.animation
|
||||
|
||||
#begin Textures/Animations/player_running_top_rotate.animation
|
||||
/copy:Textures/Animations/player_running_top_rotate.animation
|
||||
|
||||
|
@ -221,18 +248,6 @@
|
|||
#begin Textures/Animations/zombie_walk.animation
|
||||
/copy:Textures/Animations/zombie_walk.animation
|
||||
|
||||
#begin Textures/AnimationTextures/Character/hr-level1_idle.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:Textures/AnimationTextures/Character/hr-level1_idle.png
|
||||
|
||||
#begin Textures/AnimationTextures/Character/hr-level1_idle_gun.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
|
@ -245,6 +260,18 @@
|
|||
/processorParam:TextureFormat=Color
|
||||
/build:Textures/AnimationTextures/Character/hr-level1_idle_gun.png
|
||||
|
||||
#begin Textures/AnimationTextures/Character/hr-level1_idle.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:Textures/AnimationTextures/Character/hr-level1_idle.png
|
||||
|
||||
#begin Textures/AnimationTextures/Character/hr-level1_mining_tool-1.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
|
@ -269,18 +296,6 @@
|
|||
/processorParam:TextureFormat=Color
|
||||
/build:Textures/AnimationTextures/Character/hr-level1_mining_tool-2.png
|
||||
|
||||
#begin Textures/AnimationTextures/Character/hr-level1_running.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:Textures/AnimationTextures/Character/hr-level1_running.png
|
||||
|
||||
#begin Textures/AnimationTextures/Character/hr-level1_running_gun.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
|
@ -293,6 +308,18 @@
|
|||
/processorParam:TextureFormat=Color
|
||||
/build:Textures/AnimationTextures/Character/hr-level1_running_gun.png
|
||||
|
||||
#begin Textures/AnimationTextures/Character/hr-level1_running.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:Textures/AnimationTextures/Character/hr-level1_running.png
|
||||
|
||||
#begin Textures/AnimationTextures/unicorn.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
|
@ -413,18 +440,6 @@
|
|||
/processorParam:TextureFormat=Color
|
||||
/build:Textures/GUI/background/waiting.png
|
||||
|
||||
#begin Textures/GUI/checkboxs_off.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:Textures/GUI/checkboxs_off.png
|
||||
|
||||
#begin Textures/GUI/checkboxs_off-on.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
|
@ -437,6 +452,18 @@
|
|||
/processorParam:TextureFormat=Color
|
||||
/build:Textures/GUI/checkboxs_off-on.png
|
||||
|
||||
#begin Textures/GUI/checkboxs_off.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:Textures/GUI/checkboxs_off.png
|
||||
|
||||
#begin Textures/GUI/checkboxs_on.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
|
@ -473,18 +500,6 @@
|
|||
/processorParam:TextureFormat=Color
|
||||
/build:Textures/GUI/mouse.png
|
||||
|
||||
#begin Textures/GUI/switch.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:Textures/GUI/switch.png
|
||||
|
||||
#begin Textures/GUI/Switch_backgrownd.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
|
@ -497,6 +512,18 @@
|
|||
/processorParam:TextureFormat=Color
|
||||
/build:Textures/GUI/Switch_backgrownd.png
|
||||
|
||||
#begin Textures/GUI/switch.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
/processorParam:ColorKeyColor=255,0,255,255
|
||||
/processorParam:ColorKeyEnabled=True
|
||||
/processorParam:GenerateMipmaps=False
|
||||
/processorParam:PremultiplyAlpha=True
|
||||
/processorParam:ResizeToPowerOfTwo=False
|
||||
/processorParam:MakeSquare=False
|
||||
/processorParam:TextureFormat=Color
|
||||
/build:Textures/GUI/switch.png
|
||||
|
||||
#begin Textures/icons/12.png
|
||||
/importer:TextureImporter
|
||||
/processor:TextureProcessor
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
{"id":"player_run_down","textureName":"Textures/AnimationTextures/Character/hr-level1_running","startSpriteRectangle":{"X":0,"Y":528,"Width":88,"Height":132},"frameSecond":[{"Item1":0,"Item2":2}],"textureFrameInterval":0,"framesCount":22,"isCycle":true,"offset":"0, 0"}
|
|
@ -0,0 +1 @@
|
|||
{"id":"player_run_left","textureName":"Textures/AnimationTextures/Character/hr-level1_running","startSpriteRectangle":{"X":0,"Y":792,"Width":88,"Height":132},"frameSecond":[{"Item1":0,"Item2":2}],"textureFrameInterval":0,"framesCount":22,"isCycle":true,"offset":"0, 0"}
|
|
@ -0,0 +1 @@
|
|||
{"id":"player_run_left_down","textureName":"Textures/AnimationTextures/Character/hr-level1_running","startSpriteRectangle":{"X":0,"Y":660,"Width":88,"Height":132},"frameSecond":[{"Item1":0,"Item2":2}],"textureFrameInterval":0,"framesCount":22,"isCycle":true,"offset":"0, 0"}
|
|
@ -0,0 +1 @@
|
|||
{"id":"player_run_left_up","textureName":"Textures/AnimationTextures/Character/hr-level1_running","startSpriteRectangle":{"X":0,"Y":924,"Width":88,"Height":132},"frameSecond":[{"Item1":0,"Item2":2}],"textureFrameInterval":0,"framesCount":22,"isCycle":true,"offset":"0, 0"}
|
|
@ -0,0 +1 @@
|
|||
{"id":"player_run_right","textureName":"Textures/AnimationTextures/Character/hr-level1_running","startSpriteRectangle":{"X":0,"Y":264,"Width":88,"Height":132},"frameSecond":[{"Item1":0,"Item2":2}],"textureFrameInterval":0,"framesCount":22,"isCycle":true,"offset":"0, 0"}
|
BIN
ZoFo/Content/Textures/Animations/player_run_right.zip
Normal file
BIN
ZoFo/Content/Textures/Animations/player_run_right.zip
Normal file
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
{"id":"player_run_right_down","textureName":"Textures/AnimationTextures/Character/hr-level1_running","startSpriteRectangle":{"X":0,"Y":396,"Width":88,"Height":132},"frameSecond":[{"Item1":0,"Item2":2}],"textureFrameInterval":0,"framesCount":22,"isCycle":true,"offset":"0, 0"}
|
|
@ -0,0 +1 @@
|
|||
{"id":"player_run_right_up","textureName":"Textures/AnimationTextures/Character/hr-level1_running","startSpriteRectangle":{"X":0,"Y":132,"Width":88,"Height":132},"frameSecond":[{"Item1":0,"Item2":2}],"textureFrameInterval":0,"framesCount":22,"isCycle":true,"offset":"0, 0"}
|
1
ZoFo/Content/Textures/Animations/player_run_up.animation
Normal file
1
ZoFo/Content/Textures/Animations/player_run_up.animation
Normal file
|
@ -0,0 +1 @@
|
|||
{"id":"player_run_up","textureName":"Textures/AnimationTextures/Character/hr-level1_running","startSpriteRectangle":{"X":0,"Y":0,"Width":88,"Height":132},"frameSecond":[{"Item1":0,"Item2":2}],"textureFrameInterval":0,"framesCount":22,"isCycle":true,"offset":"0, 0"}
|
|
@ -33,8 +33,8 @@ public class Player : LivingEntity
|
|||
public Player(Vector2 position) : base(position)
|
||||
{
|
||||
graphicsComponent.ObjectDrawRectangle = new Rectangle(0, 0, 30, 30);
|
||||
collisionComponent.stopRectangle = new Rectangle(0, 20, 30, 10);
|
||||
speed = 5;
|
||||
collisionComponent.stopRectangle = new Rectangle(0, 15, 30, 15);
|
||||
speed = 2.5f;
|
||||
|
||||
StartAnimation("player_look_down");
|
||||
}
|
||||
|
@ -46,28 +46,29 @@ public class Player : LivingEntity
|
|||
switch(AppManager.Instance.InputManager.ConvertVector2ToState(InputPlayerRotation))
|
||||
{
|
||||
case ScopeState.Top:
|
||||
|
||||
//if ((graphicsComponent as AnimatedGraphicsComponent).CurrentAnimation.TextureName!="player_run_up")
|
||||
//(graphicsComponent as AnimatedGraphicsComponent).Star ("player_run_up");
|
||||
break;
|
||||
case ScopeState.Down:
|
||||
|
||||
StartAnimation("player_run_down");
|
||||
break;
|
||||
case ScopeState.Right:
|
||||
//StartAnimation("player_running_top_rotate");
|
||||
StartAnimation("player_run_right");
|
||||
break;
|
||||
case ScopeState.Left:
|
||||
|
||||
StartAnimation("left");
|
||||
break;
|
||||
case ScopeState.TopRight:
|
||||
|
||||
StartAnimation("player_run_right_up");
|
||||
break;
|
||||
case ScopeState.TopLeft:
|
||||
|
||||
StartAnimation("player_run_left_up");
|
||||
break;
|
||||
case ScopeState.DownRight:
|
||||
|
||||
StartAnimation("player_run_right_down");
|
||||
break;
|
||||
case ScopeState.DownLeft:
|
||||
|
||||
StartAnimation("player_run_left_down");
|
||||
break;
|
||||
}
|
||||
#endregion
|
||||
|
@ -95,9 +96,6 @@ public class Player : LivingEntity
|
|||
rect.Width += 100;
|
||||
rect.Height += 100;
|
||||
Entity[] entities = AppManager.Instance.server.collisionManager.GetEntities(rect, this);
|
||||
if (entities.Length>0)
|
||||
{
|
||||
DebugHUD.DebugSet("ent[0]", entities[0].ToString());
|
||||
if (entities != null)
|
||||
{
|
||||
foreach (Entity entity in entities)
|
||||
|
@ -106,5 +104,4 @@ public class Player : LivingEntity
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue