コード例 #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
ファイル: GameObjectView.cs プロジェクト: DarkDay8/SpaceFight
        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;
 }