예제 #1
0
 public TankModel(int health, float force, float torque, BulletVariants bulletVariants)
 {
     Health         = health;
     Force          = force;
     Torque         = torque;
     BulletVariants = bulletVariants;
     //Debug.Log("Health is " + Health);
 }
예제 #2
0
 public EnemyModel(int health, float force, float torque, BulletVariants bulletVariants, EnemyColor tankColor)
 {
     Health         = health;
     Force          = force;
     Torque         = torque;
     BulletVariants = bulletVariants;
     TankColor      = tankColor;
     //Debug.Log("Health is " + Health);
 }
        public BulletController CreateBullet(Transform position, BulletVariants bulletVariants)
        {
            BulletModel bulletModel = new BulletModel(bulletScriptableObject[0], position);

            switch (bulletVariants)
            {
            case BulletVariants.WEAK:
                bulletModel = new BulletModel(bulletScriptableObject[0], position);
                break;

            case BulletVariants.MEDIUM:
                bulletModel = new BulletModel(bulletScriptableObject[1], position);
                break;

            case BulletVariants.STRONG:
                bulletModel = new BulletModel(bulletScriptableObject[2], position);
                break;
            }
            BulletController bulletController = new BulletController(bulletModel, bulletView);

            return(bulletController);
        }
예제 #4
0
 public void BulletRequest(Transform turretPosition, BulletVariants bulletVariants)
 {
     bulletService.CreateBullet(turretPosition, bulletVariants);
 }