コード例 #1
0
    void Start()
    {
        wb          = FindObjectOfType <WeaponBench>();
        pab         = FindObjectOfType <PassiveBench>();
        pob         = FindObjectOfType <PowerupBench>();
        mp          = FindObjectOfType <MusicPlayer>();
        ic          = FindObjectOfType <InputController>();
        gops        = FindObjectOfType <GameOptions>();
        TMPBUI      = GameObject.Find("TMPBUI").GetComponent <TextMeshProUGUI>();
        TMPTUT      = GameObject.Find("TMPTUT").GetComponent <TextMeshProUGUI>();
        TMPTUI      = GameObject.Find("TMPTUI").GetComponent <TextMeshProUGUI>();
        TMPHS       = GameObject.Find("TMPHS").GetComponent <TextMeshProUGUI>();
        TMPBank     = GameObject.Find("TMPBank").GetComponent <TextMeshPro>();
        TMPTime     = GameObject.Find("TMPTime").GetComponent <TextMeshPro>();
        tutanim     = TMPTUT.GetComponent <Animator>();
        altar       = FindObjectOfType <Altar>();
        player      = FindObjectOfType <Player>();
        statl       = FindObjectOfType <StatLibrary>();
        sc          = FindObjectOfType <SpawnController>();
        TMPHS.text  = "";
        TMPTUT.text = "";
        ClearStats();

        killtext    = "Kill enemies to get necromantic energy (Detrizide).";
        dttext      = "Press or hold the " + ic.Detrizide + " key when weapon is flashing to spend energy and cast spells. Do this constantly.";
        weapontext  = "Collect weapons from the gold flashing altar in the middle once their cost has been paid.";
        passivetext = "Collect passive upgrades from the blue flashing altar to the west once their cost has been paid. ";
        poweruptext = "Powerups will periodically become available. Acquire them from the red flashing altar in the east to temporarily gain a bonus.";
        ammotext    = "Some weapons run out of ammo. Switch weapons using " + ic.CycleWeapons + " or " + ic.NextWeapon + " to refill ammo.";
        swtext      = "The Void Cannon and Devourer weapons are superweapons. These do immense damage, but cost banked Detrizide to use. Cost increases each use. ";
    }
コード例 #2
0
 void Start()
 {
     altar      = FindObjectOfType <Altar>();
     wb         = FindObjectOfType <WeaponBench>();
     sl         = FindObjectOfType <StatLibrary>();
     detrianim  = GetComponent <Animator>();
     detriLight = gameObject;
     SetDTColours();
     saveOriginalMaterials();
 }
コード例 #3
0
ファイル: Player.cs プロジェクト: VDCuddles/NVS2Scripts
 void Start()
 {
     wb         = FindObjectOfType <WeaponBench>();
     fwanimator = GameObject.FindGameObjectWithTag("FadeWall").GetComponent <Animator>();
     altar      = FindObjectOfType <Altar>();
     //resUnit = altar.GetResUnit();
     ic            = FindObjectOfType <InputController>();
     weaponmanager = FindObjectOfType <WeaponManager>();
     sc            = FindObjectOfType <SpawnController>();
     aso           = gameObject.GetComponent <AudioSource>();
     sl            = FindObjectOfType <SoundLibrary>();
     statl         = FindObjectOfType <StatLibrary>();
     unit          = gameObject.GetComponent <Unit>();
     unit.SetDeadClip(sl.GetPlayerDead());
     ownedWeaponGOs = new List <GameObject>();
     previousWeapon = FindObjectOfType <PlayerWeapon>().name;
     ownedWeaponGOs.Add(sc.provideGameObject("BoneBag"));
 }