상속: MonoBehaviour
예제 #1
0
    void Start()
    {
        //Init all skills
        allSkills.Add(gameObject.AddComponent<HealthRegenSkill>());
        allSkills.Add(gameObject.AddComponent<Skill_TimeStop>());
        //allSkills.Add(gameObject.AddComponent<Skill_BoostV2>());
        allSkills.Add(gameObject.AddComponent<Skill_BulkUp>());
        allSkills.Add(gameObject.AddComponent<IgniteSkill>());
        allSkills.Add(gameObject.AddComponent<FireballSkill>());
        allSkills.Add(gameObject.AddComponent<FireblastSkill>());
        allSkills.Add(gameObject.AddComponent<ShockSkill>());
        allSkills.Add(gameObject.AddComponent<MeteorShowerSkill>());

        si = GetComponent<Skill_info>();
        si.init(allSkills.Count, allSkills);
        cci = GetComponentInParent<Main_Process>().gameObject.GetComponentInChildren<Character_Class_Info>();
        cci.SkillUpdate(0,allSkills.Count);
        for (int i = 0; i <= allSkills.Count - 1; i++)
            cci.Class_info[0].skillid[i] = i;
    }
    // Use this for initialization
    void Start()
    {
        Text[] finds1;
        Image[] finds2;
        finds1 = GetComponentsInChildren<Text>();
        foreach (Text t in finds1)
        {
            if (t.name == "ATK")
            {
                ATK = t;
                continue;
            }
            if (t.name == "DEF")
            {
                DEF = t;
                continue;
            }
            if (t.name == "STA")
            {
                STA = t;
                continue;
            }
            if (t.name == "SPI")
            {
                SPI = t;
                continue;
            }
            if (t.name == "AGI")
            {
                AGI = t;
                continue;
            }
            if (t.name == "BATK")
            {
                BATK = t;
                continue;
            }
            if (t.name == "MATK")
            {
                MATK = t;
                continue;
            }
            if (t.name == "PDEF")
            {
                PDEF = t;
                continue;
            }
            if (t.name == "MDEF")
            {
                MDEF = t;
                continue;
            }
            if (t.name == "CRIR")
            {
                CRIR = t;
                continue;
            }
            if (t.name == "C_HP")
            {
                C_HP = t;
                continue;
            }
            if (t.name == "C_MP")
            {
                C_MP = t;
                continue;
            }
            if (t.name == "C_EXP")
            {
                C_EXP = t;
                continue;
            }
            if (t.name == "C_NEXP")
            {
                C_NEXP = t;
                continue;
            }
            if (t.name == "C_Name")
            {
                C_Name = t;
                continue;
            }
            if (t.name == "C_LV")
            {
                C_LV = t;
                continue;
            }
            if(t.name=="C_PASPoint")
            {
                C_PASP = t;
                continue;
            }

        }
        finds2 = GetComponentsInChildren<Image>();
        foreach (Image i in finds2)
        {
            if (i.name == "C_ICON")
            {
                C_ICON = i;
                continue;
            }
            if (i.name == "C_WEP")
            {
                weapon = i;
                continue;
            }
            if (i.name == "C_AMR")
            {
                amror = i;
                continue;
            }
            if (i.name == "C_ACC")
            {
                accer = i;
                continue;
            }
            if(i.name=="CM_Current")
            {
                cm_current = i;
                continue;
            }
            if(i.name=="CM_Hover_Upgrade")
            {
                upgrade = i;
                continue;
            }
        }
        main_process = GameObject.Find("Main Process").GetComponent<Main_Process>();
        CI = main_process.GetComponentInChildren<Character_Class_Info>();
        gem_system = GetComponentInChildren<UI_GEM_FullControl>();
        gem_system.mainp = main_process;
        select_current = 0;
        gem_selecting = false;
        passive_selecting = false;
        playerid = 0;
    }
예제 #3
0
    /*
    void Awake()
    {
        if (player == null)
        {
            player = gameObject;
        }else if(player != gameObject)
        {
            Destroy(gameObject);
        }
    }*/
    void Start()
    {
        state = new StandingState();
        attackState = new IdleAttackState();
        animator = GetComponent<Animator>();
        skillManager = gameObject.AddComponent<SkillManager>();
        AttackCollider.SetActive(false);
        health = GetComponent<Health>();
        controller = GetComponent<MoveController>();
        crowdControllable = GetComponent<CrowdControllable>();
        mana = GetComponent<Mana>();
        attack = GetComponentInChildren<DealDamage>();
        defense = GetComponent<Defense>();
        attackController = GetComponent<AttackController>();
        gravity = -(2 * jumpHeight) / Mathf.Pow(timeToJumpApex, 2);
        jumpVelocity = Mathf.Abs(gravity) * timeToJumpApex;
        audiosource = GetComponent<AudioSource>();

        initialRegenTime = 6;
        regenTick = 2;

        DontDestroyOnLoad(gameObject);

        skill[0] = null;
        skill[1] = null;
        skill[2] = null;
        skill[3] = null;
        threatLevel = damageDealt = 0;

        GetComponent<ID>().setTime(false);
        CCI = GameObject.Find("Main Process").GetComponentInChildren<Character_Class_Info>();
        si = GameObject.Find("Main Process").GetComponentInChildren<Skill_info>();
        Fully_Update();
    }
예제 #4
0
 void Start()
 {
     ExperincePoints = currentLevel * ExperincePointsPerLevel;
     class_info = GameObject.Find("Main Process").GetComponentInChildren<Character_Class_Info>();
     player = GetComponent<Player>();
 }
 // Use this for initialization
 void Start()
 {
     Text[] Result1;
     Result1 = GetComponentsInChildren<Text>();
     foreach (Text t in Result1)
     {
         if (t.name == "A_M_N1")
         {
             ability[1].skillname = t;
             continue;
         }
         if (t.name == "A_M_N2")
         {
             ability[2].skillname = t;
             continue;
         }
         if (t.name == "A_M_N3")
         {
             ability[3].skillname = t;
             continue;
         }
         if (t.name == "A_M_N4")
         {
             ability[4].skillname = t;
             continue;
         }
         if (t.name == "A_M_N5")
         {
             ability[5].skillname = t;
             continue;
         }
         if (t.name == "A_M_N6")
         {
             ability[6].skillname = t;
             continue;
         }
         if (t.name == "A_M_N7")
         {
             ability[7].skillname = t;
             continue;
         }
         if (t.name == "A_M_N8")
         {
             ability[8].skillname = t;
             continue;
         }
         if (t.name == "A_M_N9")
         {
             ability[9].skillname = t;
             continue;
         }
         if (t.name == "A_M_N10")
         {
             ability[10].skillname = t;
             continue;
         }
         if (t.name == "A_M_N11")
         {
             ability[11].skillname = t;
             continue;
         }
         if (t.name == "A_M_N12")
         {
             ability[12].skillname = t;
             continue;
         }
         if (t.name == "A_M_N13")
         {
             ability[13].skillname = t;
             continue;
         }
         if (t.name == "A_M_N14")
         {
             ability[14].skillname = t;
             continue;
         }
         if (t.name == "A_M_SI")
         {
             Skill_info = t;
             continue;
         }
         if (t.name == "A_M_tips")
         {
             Tips = t;
             continue;
         }
     }
     Image[] Result2;
     Result2 = GetComponentsInChildren<Image>();
     foreach (Image i in Result2)
     {
         if (i.name == "A_M_I1")
         {
             ability[1].skillicon = i;
             continue;
         }
         if (i.name == "A_M_I2")
         {
             ability[2].skillicon = i;
             continue;
         }
         if (i.name == "A_M_I3")
         {
             ability[3].skillicon = i;
             continue;
         }
         if (i.name == "A_M_I4")
         {
             ability[4].skillicon = i;
             continue;
         }
         if (i.name == "A_M_I5")
         {
             ability[5].skillicon = i;
             continue;
         }
         if (i.name == "A_M_I6")
         {
             ability[6].skillicon = i;
             continue;
         }
         if (i.name == "A_M_I7")
         {
             ability[7].skillicon = i;
             continue;
         }
         if (i.name == "A_M_I8")
         {
             ability[8].skillicon = i;
             continue;
         }
         if (i.name == "A_M_I9")
         {
             ability[9].skillicon = i;
             continue;
         }
         if (i.name == "A_M_I10")
         {
             ability[10].skillicon = i;
             continue;
         }
         if (i.name == "A_M_I11")
         {
             ability[11].skillicon = i;
             continue;
         }
         if (i.name == "A_M_I12")
         {
             ability[12].skillicon = i;
             continue;
         }
         if (i.name == "A_M_I13")
         {
             ability[13].skillicon = i;
             continue;
         }
         if (i.name == "A_M_I14")
         {
             ability[14].skillicon = i;
             continue;
         }
         if (i.name == "A_M_Current")
         {
             Current = i;
             continue;
         }
         if (i.name == "A_M_Q1")
         {
             Quick_slot[1] = i;
             continue;
         }
         if (i.name == "A_M_Q2")
         {
             Quick_slot[2] = i;
             continue;
         }
         if (i.name == "A_M_Q3")
         {
             Quick_slot[3] = i;
             continue;
         }
         if (i.name == "A_M_Q4")
         {
             Quick_slot[4] = i;
             continue;
         }
     }
     Skill_video = GetComponentInChildren<RawImage>();
     MainProcess = GameObject.Find("Main Process").GetComponent<Main_Process>();
     CCIS = MainProcess.GetComponentInChildren<Character_Class_Info>();
     SI = MainProcess.GetComponentInChildren<Skill_info>();
     //Change();
 }
 // Use this for initialization
 void Start()
 {
     main_process = GameObject.Find("Main Process").GetComponent<Main_Process>();
     ci = main_process.gameObject.GetComponentInChildren<Character_Class_Info>();
     gameObject.SetActive(false);
 }
 // Use this for initialization
 void Start()
 {
     Text[] Result1;
     Result1 = GetComponentsInChildren<Text>();
     foreach (Text t in Result1)
     {
         if(t.name=="S_H_N1")
         {
             shop_skill[1].skillname = t;
             continue;
         }
         if (t.name == "S_H_N2")
         {
             shop_skill[2].skillname = t;
             continue;
         }
         if (t.name == "S_H_N3")
         {
             shop_skill[3].skillname = t;
             continue;
         }
         if (t.name == "S_H_N4")
         {
             shop_skill[4].skillname = t;
             continue;
         }
         if (t.name == "S_H_N5")
         {
             shop_skill[5].skillname = t;
             continue;
         }
         if (t.name == "S_H_N6")
         {
             shop_skill[6].skillname = t;
             continue;
         }
         if (t.name == "S_H_N7")
         {
             shop_skill[7].skillname = t;
             continue;
         }
         if (t.name == "S_H_N8")
         {
             shop_skill[8].skillname = t;
             continue;
         }
         if (t.name == "S_H_N9")
         {
             shop_skill[9].skillname = t;
             continue;
         }
         if (t.name == "S_H_N10")
         {
             shop_skill[10].skillname = t;
             continue;
         }
         if (t.name == "S_H_N11")
         {
             shop_skill[11].skillname = t;
             continue;
         }
         if (t.name == "S_H_N12")
         {
             shop_skill[12].skillname = t;
             continue;
         }
         if (t.name == "S_H_N13")
         {
             shop_skill[13].skillname = t;
             continue;
         }
         if (t.name == "S_H_N14")
         {
             shop_skill[14].skillname = t;
             continue;
         }
         if (t.name == "S_H_G")
         {
             Gold = t;
             continue;
         }
         if (t.name == "S_H_C")
         {
             Classname = t;
             continue;
         }
         if (t.name == "S_H_SI")
         {
             Skill_info = t;
             continue;
         }
         if(t.name=="S_H_tips")
         {
             Tips = t;
             continue;
         }
     }
     Image[] Result2;
     Result2 = GetComponentsInChildren<Image>();
     foreach(Image i in Result2)
     {
         if(i.name=="S_H_I1")
         {
             shop_skill[1].skillicon = i;
             continue;
         }
         if (i.name == "S_H_I2")
         {
             shop_skill[2].skillicon = i;
             continue;
         }
         if (i.name == "S_H_I3")
         {
             shop_skill[3].skillicon = i;
             continue;
         }
         if (i.name == "S_H_I4")
         {
             shop_skill[4].skillicon = i;
             continue;
         }
         if (i.name == "S_H_I5")
         {
             shop_skill[5].skillicon = i;
             continue;
         }
         if (i.name == "S_H_I6")
         {
             shop_skill[6].skillicon = i;
             continue;
         }
         if (i.name == "S_H_I7")
         {
             shop_skill[7].skillicon = i;
             continue;
         }
         if (i.name == "S_H_I8")
         {
             shop_skill[8].skillicon = i;
             continue;
         }
         if (i.name == "S_H_I9")
         {
             shop_skill[9].skillicon = i;
             continue;
         }
         if (i.name == "S_H_I10")
         {
             shop_skill[10].skillicon = i;
             continue;
         }
         if (i.name == "S_H_I11")
         {
             shop_skill[11].skillicon = i;
             continue;
         }
         if (i.name == "S_H_I12")
         {
             shop_skill[12].skillicon = i;
             continue;
         }
         if (i.name == "S_H_I13")
         {
             shop_skill[13].skillicon = i;
             continue;
         }
         if (i.name == "S_H_I14")
         {
             shop_skill[14].skillicon = i;
             continue;
         }
         if (i.name == "S_H_Current")
         {
             Current = i;
             continue;
         }
     }
     Skill_video = GetComponentInChildren<RawImage>();
     MainProcess = GameObject.Find("Main Process").GetComponent<Main_Process>();
     CCIS= MainProcess.GetComponentInChildren<Character_Class_Info>();
     si = MainProcess.GetComponentInChildren<Skill_info>();
     //Change();
     gameObject.SetActive(false);
 }
 // Use this for initialization
 void Start()
 {
     Text[] finds1;
     Image[] finds2;
     GameObject GOResult;
     //Set Static
     DontDestroyOnLoad(this.gameObject);
     //Link Database
     GOResult = GameObject.Find("DataBase");
     Boss_HeadIcon_Script = GOResult.GetComponent<Boss_HeadIcon>();
     Character_Class_Info_Script = GOResult.GetComponent<Character_Class_Info>();
     GOResult = GameObject.Find("SkillDataBase");
     SI = GOResult.GetComponent<Skill_info>();
     //Link BOSS INFO
     finds2 = BossMode.GetComponentsInChildren<Image>();
     foreach (Image i in finds2)
     {
         if(i.name=="HP")
         {
            //Debug.Log("Find Boss HP");
             Boss_HP = i;
             continue;
         }
         if(i.name=="HEAD ICON")
         {
             Boss_Icon = i;
             continue;
         }
     }
     finds1 = TeamMode.GetComponentsInChildren<Text>();
     finds2 = TeamMode.GetComponentsInChildren<Image>();
     foreach(Text t in finds1)
     {
         if (t.name == "T1N")
             {
                 //Debug .Log("T1N Found!");
                 partner_name[0] = t;
                 continue;
             }
             if (t.name == "T2N")
             {
                 //Debug.Log("T1N Found!");
                 partner_name[1] = t;
                 continue;
             }
             if (t.name == "T3N")
             {
                 //Debug.Log("T3N Found!");
                 partner_name[2] = t;
                 continue;
             }
             if (t.name == "T4N")
             {
                 //Debug.Log("T4N Found!");
                 partner_name[3] = t;
                 continue;
             }
             if (t.name == "T5N")
             {
                 //Debug.Log("T5N Found!");
                 partner_name[4] = t;
                 continue;
             }
             if (t.name == "T6N")
             {
                 //Debug.Log("T6N Found!");
                 partner_name[5] = t;
                 continue;
             }
     }
     foreach(Image i in finds2)
     {
         if (i.name == "T1H")
         {
             //Debug .Log("HP Value Found!");
             partner_hp[0] = i;
             continue;
         }
         if (i.name == "T1M")
         {
             //Debug .Log("HP Value Found!");
             partner_mp[0] = i;
             continue;
         }
         if (i.name == "T2H")
         {
             //Debug .Log("HP Value Found!");
             partner_hp[1] = i;
             continue;
         }
         if (i.name == "T2M")
         {
             //Debug .Log("HP Value Found!");
             partner_mp[1] = i;
             continue;
         }
         if (i.name == "T3H")
         {
             //Debug .Log("HP Value Found!");
             partner_hp[2] = i;
             continue;
         }
         if (i.name == "T3M")
         {
             //Debug .Log("HP Value Found!");
             partner_mp[2] = i;
             continue;
         }
         if (i.name == "T4H")
         {
             //Debug .Log("HP Value Found!");
             partner_hp[3] = i;
             continue;
         }
         if (i.name == "T4M")
         {
             //Debug .Log("HP Value Found!");
             partner_mp[3] = i;
             continue;
         }
         if (i.name == "T5H")
         {
             //Debug .Log("HP Value Found!");
             partner_hp[4] = i;
             continue;
         }
         if (i.name == "T5M")
         {
             //Debug .Log("HP Value Found!");
             partner_mp[4] = i;
             continue;
         }
         if (i.name == "T6H")
         {
             //Debug .Log("HP Value Found!");
             partner_hp[5] = i;
             continue;
         }
         if (i.name == "T6M")
         {
             //Debug .Log("HP Value Found!");
             partner_mp[5] = i;
             continue;
         }
     }
 }