コード例 #1
0
 public SelfDestructOnJumpComponent(Entity parent, Environment environment, Character attackingCharacter)
     : base(parent, "SelfDestructOnJumpComponent")
 {
     this.markedForRemoval = false;
     this.environment = environment;
     this.jumpComponent = (JumpComponent) attackingCharacter.GetComponent("JumpComponent");
 }
コード例 #2
0
 public GrabComponent(Entity parent, Environment environment, float baseDamage, float maxDamage)
     : base(parent, "GrabComponent")
 {
     this.environment = environment;
     this.baseDamage = baseDamage;
     this.maxDamage = maxDamage;
 }
コード例 #3
0
 public JumpComponent(Entity parent, int jumpHeight, int maxJumps, Environment environment)
     : base(parent, "JumpComponent")
 {
     this.JumpHeight = jumpHeight;
     this.MaxJumps = maxJumps;
     this.JumpedThisFrame = false;
     this.environment = environment;
 }
コード例 #4
0
 public ItemManagerComponent(Entity parent, EntityManager entityManager, PhysicsSimulator physics, Arena arena)
     : base(parent, "ItemManagerComponent")
 {
     this.entityManager = entityManager;
     this.physics = physics;
     this.arena = arena;
     this.Items = new List<Item>();
 }
コード例 #5
0
 public PunchComponent(Entity parent, Environment environment, int punchSpeed, float baseDamage, float maxDamage, float minFlinch, float maxFlinch)
     : base(parent, "PunchComponent")
 {
     this.punchSpeed = punchSpeed;
     this.environment = environment;
     this.baseDamage = baseDamage;
     this.maxDamage = maxDamage;
     this.minFlinch = minFlinch;
     this.maxFlinch = maxFlinch;
 }
コード例 #6
0
 public FireProjectileComponent(Entity parent, int fireSpeed, int fireVelocity, Environment environment, float baseDamage, float maxDamage, float minFlinch, float maxFlinch)
     : base(parent, "FireProjectileComponent")
 {
     this.fireSpeed = fireSpeed;
     this.environment = environment;
     this.fireVelocity = fireVelocity;
     this.baseDamage = baseDamage;
     this.maxDamage = maxDamage;
     this.minFlinch = minFlinch;
     this.maxFlinch = maxFlinch;
 }
コード例 #7
0
 public VitalityComponent(Entity parent, int lives)
     : base(parent, "VitalityComponent")
 {
     this.IsAlive = true;
     this.IsKO = false;
     this.LivesLeft = lives - 1;
     this.RageMeter = 100.0f;
     for (int i = 0; i < 4; i++)
     {
         timeTillRumbleOff[i] = 0;
     }
 }
コード例 #8
0
        public DrawableHUDComponent(Entity parent, List<Character> characters)
            : base(parent, "DrawableHUDComponent")
        {
            this.rageFont = ContentLoader.HUDRageFont;
            this.livesFont = ContentLoader.HUDLivesFont;
            this.characters = characters;

            vitalityComponents = new List<VitalityComponent>();
            for (int i = 0; i < characters.Count; i++)
            {
                VitalityComponent component = (VitalityComponent) characters[i].GetComponent("VitalityComponent");
                vitalityComponents.Add(component);
            }
            this.characters = characters;
        }
コード例 #9
0
 public BasicModelComponent(Entity parent, Model model)
     : base(parent, "BasicModelComponent")
 {
     this.model = model;
 }
コード例 #10
0
 /// <summary>
 /// Temporarily ignores an entity for collision. Entity is ignored 
 /// until the item is no longer colliding with the given entity.
 /// Useful for making exceptions to collision rules.
 /// </summary>
 /// <param name="entity">The entity to ignore.</param>
 public void IgnoreEntityTemporarily(Entity entity)
 {
     tempIgnoredEntities.Add(entity);
     ignoredEntities.Add(entity);
 }
コード例 #11
0
 /// <summary>
 /// Permanently ignores an entity for collision. Useful for making 
 /// exceptions to collision rules.
 /// </summary>
 /// <param name="entity">The entity to ignore.</param>
 public void IgnoreEntity(Entity entity)
 {
     ignoredEntities.Add(entity);
 }
コード例 #12
0
 public CubeRenderComponent(Entity parent, Matrix transform)
     : base(parent, ContentLoader.Cube)
 {
     this.Transform = transform;
 }
コード例 #13
0
 public IceCreamRenderComponent(Entity parent, Matrix transform)
     : base(parent, ContentLoader.IceCream)
 {
     this.Transform = transform;
 }