public EntityVisual(AnimationSet animationSet) { direction = 0; stance = EntityStance.Standing; this.animationSet = animationSet; SetAnimation(stance, direction); }
private bool SetAnimation(EntityStance stance, int direction) { bool ok = SetAnimation(GetAnimationName(stance), direction); this.stance = GetEntityStance(AnimationName); return(ok); }
private string GetAnimationName(EntityStance stance) { switch (stance) { case EntityStance.Standing: return("stance"); case EntityStance.Running: return("run"); case EntityStance.Spawning: return("spawn"); } return(""); }
public void InitializeDefaults() { isAlive = true; isGrounded = true; health = 100; pace = EntityPace.Jogging; stance = EntityStance.Standing; action = EntityAction.Idle; actionCached = EntityAction.Idle; aimSmoothing = true; aimTime = 0.05f; rotationSmoothing = true; rotationTime = 0.05f; speedSmoothing = false; speedTime = 0.15f; velocitySmoothing = true; velocityTime = 0.15f; }
public bool InitAnimation(EntityStance stance, int direction) { this.direction = direction; return(visual.Init(stance, direction)); }
public bool Init(EntityStance stance, int direction) { this.stance = stance; this.direction = direction; return(SetAnimation(stance, direction)); }