public void Initialize(BossBattleController controller)
    {
        this.controller = controller;

        SetupParty();
        HideMemberArea();
    }
Beispiel #2
0
    public BossActor(BossData boss, MonsterHandler handler, FloatingCombatTextInterface FCTInterface, BossBattleController controller)
    {
        this.boss         = boss;
        this.handler      = handler;
        this.Health       = boss.MaxHealth;
        this.FCTInterface = FCTInterface;
        this.controller   = controller;

        this.speed = boss.Speed;
    }
Beispiel #3
0
    void CreateUnits(int num)
    {
        battleCamera = CreateCamera();

        for (int i = 0; i < status.monsterNumbers[num].Length; i++)
        {
            int number = status.monsterNumbers[num][i];

            GameObject enemy = Instantiate(status.monstersData[number].modle) as GameObject;

            if (number == 3)
            {
                BossBattleController auto = enemy.AddComponent <BossBattleController> ();
                enemyList.Add(auto);
                auto.InitBattle(this.gameObject, battleCamera, status.monsterPositions[i], Quaternion.identity, "Enemy", number, status.playersData[number].status);
                auto.SetEffects(status.playersData[number].attackEffect);
                auto.enabled = false;
            }
            else
            {
                EnemyBattleController auto = enemy.AddComponent <EnemyBattleController> ();
                enemyList.Add(auto);
                auto.InitBattle(this.gameObject, battleCamera, status.monsterPositions[i], Quaternion.identity, "Enemy", number, status.monstersData[number].status);
                auto.enabled = false;
            }
        }

        for (int i = 0; i < 4; i++)
        {
            if (status.partyMember[i] >= 0)
            {
                GameObject player = Instantiate(status.playersData[status.partyMember[i]].modle[1]) as GameObject;

                PlayerBattleController mb = player.AddComponent <PlayerBattleController> ();
                playerList.Add(mb);

                if (i == 0)
                {
                    mb.isUser = true;
                }
                else
                {
                    mb.isUser = false;
                }

                mb.InitBattle(this.gameObject, battleCamera, status.playerPositions[i], Quaternion.Euler(0.0f, 180.0f, 0.0f), "Player", status.partyMember[i], status.playersData[status.partyMember[i]].status);
                mb.SetEffects(status.playersData[status.partyMember[i]].attackEffect);
                mb.enabled = false;
            }
        }
    }
Beispiel #4
0
    public HeroActor(Hero hero, CharacterHandler handler, FloatingCombatTextInterface FCTInterface, BossBattleController controller)
    {
        this.hero                 = hero;
        this.controller           = controller;
        this.hero.EndureTriggered = false;
        this.handler              = handler;
        this.Health               = Mathf.Round(hero.GetCoreStat(CoreStats.Health) * PlayerManager.Instance.GetBoost(BoostType.Health));
        this.FCTInterface         = FCTInterface;

        this.speed = hero.GetPrimaryStat(PrimaryStats.Speed);

        if (this.hero.data.Class == HeroClass.Mage && (Random.Range(0f, 1f) < MAGE_SHIELD_CHANCE))
        {
            // They get a shield
            ShieldAmount    = ((float)this.hero.GetPrimaryStat(PrimaryStats.Intelligence) * 0.25f);
            ShieldAmountMax = ShieldAmount;
            handler.Shield.SetActive(true);
        }
    }
Beispiel #5
0
    private void InitAttackEvent()
    {
        GameObject battleCamera = Instantiate(Resources.Load("Prefabs/Cameras/BattleCamera", typeof(GameObject)) as GameObject, Vector3.zero, Quaternion.identity) as GameObject;

        battleCamera.GetComponent <Camera>().enabled = false;
        battleCamera.AddComponent <ShinBattleCamera> ();

        for (int i = 0; i < 2; i++)
        {
            GameObject player = Instantiate(status.playersData[i].modle[1]) as GameObject;

            PlayerBattleController mb = player.AddComponent <PlayerBattleController> ();
            mb.InitBattle(this.gameObject, battleCamera, status.playerPositions[i], Quaternion.Euler(0.0f, 180.0f, 0.0f), "Player", i, status.playersData[status.partyMember[i]].status);
            mb.AddAttackEvent();
            Destroy(player);
        }

        for (int i = 0; i < 4; i++)
        {
            GameObject enemy = Instantiate(status.monstersData[i].modle) as GameObject;

            if (i == 3)
            {
                BossBattleController auto = enemy.AddComponent <BossBattleController> ();
                auto.InitBattle(this.gameObject, battleCamera, status.monsterPositions[i], Quaternion.identity, "Enemy", 0, status.playersData[i].status);
                auto.AddAttackEvent();
            }
            else
            {
                EnemyBattleController auto = enemy.AddComponent <EnemyBattleController> ();
                auto.InitBattle(this.gameObject, battleCamera, status.monsterPositions[i], Quaternion.identity, "Enemy", 0, status.monstersData[i].status);
                auto.AddAttackEvent();
            }
            Destroy(enemy);
        }

        Destroy(battleCamera);
    }