Example #1
0
    public override void SpawnSkill(int type, int level, int damage, Vector3 fromPos, bool isYou)
    {
        GameObject    tempGameObject;
        SkillFireBall skill;

        switch (type)
        {
        case SlotItemPirate.ITEM_CHOPPER:
            tempGameObject = MyPoolManager.Instance.Spawn("SkillBite", skillCamera.transform).gameObject;
            SkillBite skillBite = tempGameObject.GetComponent <SkillBite>();
            skillBite.Init(level, damage, bossManager);
            break;

        case SlotItemPirate.ITEM_USOOP:
            tempGameObject = MyPoolManager.Instance.Spawn("SkillFireBall", skillCamera.transform).gameObject;
            SkillSpellFire skillSpellFire = tempGameObject.GetComponent <SkillSpellFire>();
            skillSpellFire.Init(level, damage, bossManager, fromPos);
            break;

        case SlotItemPirate.ITEM_NAMI:
            tempGameObject = MyPoolManager.Instance.Spawn("SkillThunder", skillCamera.transform).gameObject;
            SkillThunder thunderSkill = tempGameObject.GetComponent <SkillThunder>();
            thunderSkill.Init(level, damage, bossManager);
            break;

        case SlotItemPirate.ITEM_FRANKY:
            tempGameObject = MyPoolManager.Instance.Spawn("SkillFlameThrower", skillCamera.transform).gameObject;
            SkillFlameThrower skillFlameThrower = tempGameObject.GetComponent <SkillFlameThrower>();
            skillFlameThrower.Init(level, damage, bossManager, fromPos, isYou);
            break;

        case SlotItemPirate.ITEM_BROOK:
            tempGameObject = MyPoolManager.Instance.Spawn("SkillDagger", skillCamera.transform).gameObject;
            SkillDagger skillSword = tempGameObject.GetComponent <SkillDagger>();
            skillSword.Init(level, damage, bossManager);
            break;

        case SlotItemPirate.ITEM_NICO:
            tempGameObject = MyPoolManager.Instance.Spawn("SkillIcePurple", skillCamera.transform).gameObject;
            SkillIcePurple skillIcePurple = tempGameObject.GetComponent <SkillIcePurple>();
            skillIcePurple.Init(level, damage, bossManager);
            break;

        case SlotItemPirate.ITEM_SANJI:
            tempGameObject = MyPoolManager.Instance.Spawn("SkillSanji", skillCamera.transform).gameObject;
            SkillSanji skillSanji = tempGameObject.GetComponent <SkillSanji>();
            skillSanji.Init(level, damage, bossManager);
            break;

        case SlotItemPirate.ITEM_ZORO:
            tempGameObject = MyPoolManager.Instance.Spawn("SkillSwordBlue", skillCamera.transform).gameObject;
            SkillSwordBlue skillSwordBlue = tempGameObject.GetComponent <SkillSwordBlue>();
            skillSwordBlue.Init(level, damage, bossManager);
            break;

        case SlotItemPirate.ITEM_LUFFY:
            tempGameObject = MyPoolManager.Instance.Spawn("SkillLuffy", skillCamera.transform).gameObject;
            SkillLuffy skillLuffy = tempGameObject.GetComponent <SkillLuffy>();
            skillLuffy.Init(level, damage, bossManager, fromPos);
            break;
            // case SlotItemPirate.ITEM_RALLY:
            //  tempGameObject = MyPoolManager.Instance.Spawn("SkillFireBall", skillCamera.transform).gameObject;
            //  // tempGameObject = NGUITools.AddChild(skillCamera, Resources.Load(Global.SCREEN_PATH + "/GameScreen/SlotMachine/SlotPirateScreen/SkillFireBall", typeof(GameObject)) as GameObject);
            //  skill = tempGameObject.GetComponent<SkillFireBall>();
            //  skill.Init(level, damage, bossManager);
            // break;
        }
        // tempGameObject = MyPoolManager.Instance.Spawn("SkillFlameThrower", skillCamera.transform).gameObject;
        // SkillFlameThrower skillFlameThrower = tempGameObject.GetComponent<SkillFlameThrower>();
        // skillFlameThrower.Init(1, damage, bossManager, otherPlayers[0].transform.position, false);
    }
Example #2
0
    public override void SpawnSkill(int type, int level, int damage, Vector3 fromPos, bool isYou)
    {
        GameObject    tempGameObject;
        SkillFireBall skill;

        switch (type)
        {
        case SlotItemDragon.ITEM_TRAP:
            tempGameObject = MyPoolManager.Instance.Spawn("SkillBite", skillCamera.transform).gameObject;
            SkillBite skillBite = tempGameObject.GetComponent <SkillBite>();
            skillBite.Init(level, damage, bossManager);
            break;

        case SlotItemDragon.ITEM_BOW:
            tempGameObject = MyPoolManager.Instance.Spawn("SkillBow", skillCamera.transform).gameObject;
            SkillBow skillBow = tempGameObject.GetComponent <SkillBow>();
            skillBow.Init(level, damage, bossManager, fromPos);
            break;

        case SlotItemDragon.ITEM_SPELLWATER:
            tempGameObject = MyPoolManager.Instance.Spawn("SkillSpellIce", skillCamera.transform).gameObject;
            SkillSpellIce skillSpellIce = tempGameObject.GetComponent <SkillSpellIce>();
            skillSpellIce.Init(level, damage, bossManager, fromPos);
            break;

        case SlotItemDragon.ITEM_AXE:
            tempGameObject = MyPoolManager.Instance.Spawn("SkillAxe", skillCamera.transform).gameObject;
            SkillAxe skillAxe = tempGameObject.GetComponent <SkillAxe>();
            skillAxe.Init(level, damage, bossManager);
            break;

        case SlotItemDragon.ITEM_BOMB:
            tempGameObject = MyPoolManager.Instance.Spawn("SkillSkullBomb", skillCamera.transform).gameObject;
            SkillSkullBomb skillBomb = tempGameObject.GetComponent <SkillSkullBomb>();
            skillBomb.Init(level, damage, bossManager);
            break;

        case SlotItemDragon.ITEM_SPELLLIGHTING:
            tempGameObject = MyPoolManager.Instance.Spawn("SkillSpellLighting", skillCamera.transform).gameObject;
            SkillSpellLighting skillSpellLighting = tempGameObject.GetComponent <SkillSpellLighting>();
            skillSpellLighting.Init(level, damage, bossManager, fromPos);
            break;

        case SlotItemDragon.ITEM_SWORD:
            tempGameObject = MyPoolManager.Instance.Spawn("SkillSwordBlue", skillCamera.transform).gameObject;
            SkillSwordBlue skillSword = tempGameObject.GetComponent <SkillSwordBlue>();
            skillSword.Init(level, damage, bossManager);
            break;

        case SlotItemDragon.ITEM_SPELLFIRE:
            tempGameObject = MyPoolManager.Instance.Spawn("SkillSpellFire", skillCamera.transform).gameObject;
            SkillSpellFire skillSpellFire = tempGameObject.GetComponent <SkillSpellFire>();
            skillSpellFire.Init(level, damage, bossManager, fromPos);
            break;

        case SlotItemDragon.ITEM_METEOR:
            tempGameObject = MyPoolManager.Instance.Spawn("SkillMeteor", skillCamera.transform).gameObject;
            SkillMeteor skillMeteor = tempGameObject.GetComponent <SkillMeteor>();
            skillMeteor.Init(level, damage, bossManager, fromPos);
            break;
            // case SlotItemDragon.ITEM_SPELLRUBY:
            //  tempGameObject = MyPoolManager.Instance.Spawn("SkillIcePurple", skillCamera.transform).gameObject;
            //  SkillIcePurple skillIcePurple = tempGameObject.GetComponent<SkillIcePurple>();
            //  skillIcePurple.Init(level, damage, bossManager);
            // break;
        }
        // tempGameObject = MyPoolManager.Instance.Spawn("SkillSpellLighting", skillCamera.transform).gameObject;
        // SkillSpellLighting skillSpellFire = tempGameObject.GetComponent<SkillSpellLighting>();
        // skillSpellFire.Init(level, damage, bossManager, fromPos);
    }