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; }
private void OnTriggerEnter2D(Collider2D collision) { GameObjectView TriggerGameObjectView = collision.GetComponent <GameObjectView>(); if (TriggerGameObjectView != null) { if (TriggerGameObjectView.fraction != fraction) { GetDamage(TriggerGameObjectView.damagePover); } } }
public BaseGameObject(GameObjectView obj, float maxHp, float speed, float pover) : this(obj, maxHp, speed, pover, Fractions.Minor) { }
public BaseGameObject(GameObjectView obj, float maxHp, float speed) : this(obj, maxHp, speed, 0) { }
public BaseGameObject(GameObjectView obj, float maxHp) : this(obj, maxHp, 0) { }
public BaseGameObject(GameObjectView obj) : this(obj, 1) { }
public Player(GameObjectView obj, float maxHp, float speed, float pover) : base(obj, maxHp, speed, pover) { Fraction = Fractions.Player; }
public Player(GameObjectView obj, float maxHp) : base(obj, maxHp) { Fraction = Fractions.Player; }
public Player(GameObjectView obj) : base(obj) { Fraction = Fractions.Player; }