예제 #1
0
    void Start()
    {
        transform.localPosition = transform.parent.InverseTransformPoint(transform.position);
        bulletController        = this.GetComponent <BulletController>();
        bulletController.ATK    = UnityEngine.Random.Range(towerController.attribute.MinATK
                                                           + towerController.Bonus.ATK, towerController.attribute.MaxATK + towerController.Bonus.ATK);
        this.enemy = towerAction.enemy;

        switch (towerController.chaseType)
        {
        case EBulletChaseType.CHASE:
            bulletTemplate = new BulletChase();
            break;

        case EBulletChaseType.DROP:
            bulletTemplate = new BulletDrop();
            break;

        case EBulletChaseType.EXPLOSION:
            bulletTemplate = new BulletExplosion();
            break;

        case EBulletChaseType.BOMB:
            bulletTemplate = new BulletBomb();
            break;

        case EBulletChaseType.ARCHITECT:
            bulletTemplate = new BulletArchitect();
            break;
        }

        bulletTemplate.updateEnemy(enemy);
        bulletTemplate.Initalize(bulletController);
        bulletTemplate.Update();
    }
예제 #2
0
    void Start()
    {
        transform.localPosition = transform.parent.InverseTransformPoint(transform.position);
        bulletController = this.GetComponent<BulletController>();
        bulletController.ATK = UnityEngine.Random.Range(towerController.attribute.MinATK 
		     + towerController.Bonus.ATK, towerController.attribute.MaxATK + towerController.Bonus.ATK);
        this.enemy = towerAction.enemy;
  
        switch (towerController.chaseType)
        {
            case EBulletChaseType.CHASE:
                bulletTemplate = new BulletChase();
                break;
            case EBulletChaseType.DROP:
                bulletTemplate = new BulletDrop();
                break;
            case EBulletChaseType.EXPLOSION:
                bulletTemplate = new BulletExplosion();
                break;
            case EBulletChaseType.BOMB:
                bulletTemplate = new BulletBomb();
                break;
            case EBulletChaseType.ARCHITECT:
                bulletTemplate = new BulletArchitect();
                break;
        }

        bulletTemplate.updateEnemy(enemy);
        bulletTemplate.Initalize(bulletController);
        bulletTemplate.Update();
    }
예제 #3
0
 void Update()
 {
     bulletTemplate.Update();
 }