public static void SetInvincibility(InvincibilityType type)
        {
            EntityManager e      = World.DefaultGameObjectInjectionWorld.EntityManager;
            Entity        entity = GameVariables.Player.Entity;

            //Get Player LifeComponent
            LifeComponent life = e.GetComponentData <LifeComponent>(entity);

            life.SetInvincibility(type);
            e.SetComponentData(entity, life);
        }
예제 #2
0
        public override void Hit(InvincibilityType type = InvincibilityType.Normal)
        {
            if (Invincibility != InvincibilityType.None)
            {
                return;
            }

            base.Hit(type);

            TotalHits++;
        }
예제 #3
0
 public void AddHit(InvincibilityType type)
 {
     Replay.Hits.Add(new TsVal <InvincibilityType>((float)totalElapsed, type));
 }
 public void SetInvincibility(InvincibilityType type)
 {
     IsInvincible  = true;
     Invincibility = type;
 }