コード例 #1
0
 void Awake()
 {
     sk11               = sk1.GetComponent <Image>();
     sk22               = sk2.GetComponent <Image>();
     acs                = GetComponent <AudioSource>();
     bossmanager_cs     = GetComponent <BossManager>();
     sound_sc           = GetComponent <Sound>();
     charactor_animator = Character.GetComponent <Animator>();
     monstermanager_cs  = GetComponent <MonsterMananger>();
 }
コード例 #2
0
ファイル: Ingame.cs プロジェクト: JuJangGwon/Slash-of-Monster
    void Awake()
    {
        worldmap.SetActive(true);

        npcsc_sc   = npc.GetComponent <NpcScript>();
        money_text = Money_tex.GetComponent <Text>();
        Singleton.getInstance.stage      = 999;
        Singleton.getInstance.MyPosition = Inanis_map.WorldTree;
        mapname_img = MapnameSeal.GetComponent <Image>();
        Screen.SetResolution(540, 960, false);

        if (PlayerPrefs.GetInt("Money") == 0)
        {
            if (PlayerPrefs.GetInt("First") == 0)
            {
                Debug.Log("f");
                PlayerPrefs.SetInt("First", 1);
                PlayerPrefs.SetInt("Money", 100);
                PlayerPrefs.Save();
            }
        }
        int i = PlayerPrefs.GetInt("Quest");

        if (i == 0)
        {
            Singleton.getInstance.quest = Quest.none;
        }
        else if (i == 1)
        {
            Singleton.getInstance.quest = Quest.going;
        }
        else if (i == 2)
        {
            Singleton.getInstance.quest = Quest.finish;
        }
        else if (i == 3)
        {
            Singleton.getInstance.quest = Quest.fd;
        }

        if (PlayerPrefs.GetInt("BerserkerLevel") == 0)
        {
            PlayerPrefs.SetInt("BerserkerLevel", 1);
        }
        Singleton.getInstance.Level          = PlayerPrefs.GetInt("BerserkerLevel");
        Singleton.getInstance.EnableWorld[0] = 1;
        Singleton.getInstance.EnableWorld[1] = 1;
        Singleton.getInstance.EnableWorld[2] = 0;
        Singleton.getInstance.EnableWorld[3] = 0;
        Singleton.getInstance.EnableWorld[4] = 0;
        Singleton.getInstance.EnableWorld[5] = 0;
        Singleton.getInstance.money          = PlayerPrefs.GetInt("Money");
        Singleton.getInstance.Level          = PlayerPrefs.GetInt("BerserkerLevel");

        int c = 50;
        int j = Singleton.getInstance.Level;

        for (int d = 1; d < j; d++)
        {
            c += ((d) * 2 + 1);
        }
        Singleton.getInstance.Power    = c;
        Singleton.getInstance.skill1lv = PlayerPrefs.GetInt("SKill1");
        Singleton.getInstance.skill2lv = PlayerPrefs.GetInt("SKill2");
        mapname.Add("메마른 오아시스 입구");
        mapname.Add("붉은 사막길3");
        mapname.Add("붉은 사막길2");
        mapname.Add("붉은 사막길1");
        mapname.Add("황폐화된 벌판2");
        mapname.Add("황페화된 벌판1");
        mapname.Add("메마른 오아시스");
        mapname.Add("메마른 오아시스");
        money_text.text = Singleton.getInstance.money.ToString() + " G";

        bossmanager_sc     = GetComponent <BossManager>();
        mapname_text       = Mapname_gb.GetComponent <Text>();
        createpattern_sc   = GetComponent <CreatePattern>();
        monstermananger_sc = GetComponent <MonsterMananger>();
        mapselector_sc     = GetComponent <MapSelector>();
        map_sc             = Map_gb.GetComponent <Map>();
    }