예제 #1
0
 public BaseGameObject(GameObjectView obj, float maxHp, float speed, float pover, Fractions fraction)
 {
     Object        = obj;
     CurrentHp     = MaxHp = maxHp;
     Speed         = speed;
     Pover         = pover;
     Fraction      = fraction;
     obj.getDamage = GetDamage;
 }
예제 #2
0
        private void OnTriggerEnter2D(Collider2D collision)
        {
            GameObjectView TriggerGameObjectView = collision.GetComponent <GameObjectView>();

            if (TriggerGameObjectView != null)
            {
                if (TriggerGameObjectView.fraction != fraction)
                {
                    GetDamage(TriggerGameObjectView.damagePover);
                }
            }
        }
예제 #3
0
 public BaseGameObject(GameObjectView obj, float maxHp, float speed, float pover)
     : this(obj, maxHp, speed, pover, Fractions.Minor)
 {
 }
예제 #4
0
 public BaseGameObject(GameObjectView obj, float maxHp, float speed)
     : this(obj, maxHp, speed, 0)
 {
 }
예제 #5
0
 public BaseGameObject(GameObjectView obj, float maxHp)
     : this(obj, maxHp, 0)
 {
 }
예제 #6
0
 public BaseGameObject(GameObjectView obj) : this(obj, 1)
 {
 }
예제 #7
0
 public Player(GameObjectView obj, float maxHp, float speed, float pover)
     : base(obj, maxHp, speed, pover)
 {
     Fraction = Fractions.Player;
 }
예제 #8
0
 public Player(GameObjectView obj, float maxHp) : base(obj, maxHp)
 {
     Fraction = Fractions.Player;
 }
예제 #9
0
 public Player(GameObjectView obj) : base(obj)
 {
     Fraction = Fractions.Player;
 }