示例#1
0
        void Start()
        {
            // sets vectors to spawn statues at 0 for statue0's posistion ect, ect
            array[0] = new Vector3(21.29f, -272.23f, 0);
            array[1] = new Vector3(39.82f, -262.48f, 0);
            array[2] = new Vector3(36.63f, -275.01f, 0);
            array[3] = new Vector3(24.62f, -275.01f, 0);
            array[4] = new Vector3(21.49f, -262.58f, 0);
            array[5] = new Vector3(39.73f, -271.68f, 0);


            BossAudios      = GetComponents <AudioSource>();
            BossAttackAudio = BossAudios[0];
            BossHitAudio    = BossAudios[1];
            BossExtraAudio  = BossAudios[2];

            //Set the basic stats. Also attach the appropriate scripts. These can be changed in the inspector for individual enemies
            GanonHasSpear = true;

            Anim = GetComponent <Animator>();
            NextAvailableLightningSummon = Time.time;
            NextAvailableStatueSpawnTime = Time.time + 1.5f;
            NextAvailableSpearThrowTime  = Time.time + 1.8f;
            //currentDamage = damage;
            damage        = 1;
            currentHealth = maxHealth;

            //Player stuff
            Player      = GameObject.Find("Player");
            PM          = Player.GetComponent <Player_Manager>();
            PlayerAudio = PM.PlayerExternalAudio;
        }
示例#2
0
        // Use this for initialization
        void Start()
        {
            PM          = GameObject.Find("Player").GetComponent <Player_Manager>();
            SC          = GameObject.Find("SceneChanger").GetComponent <SceneChanger>();
            ButtonSound = PM.PlayerInternalAudio;

            NewGameButton = GameObject.Find("New Game").GetComponent <Button>();

            ForestButton        = GameObject.Find("ForestButton").GetComponent <Button>();
            ForestDungeonButton = GameObject.Find("ForestDungeonButton").GetComponent <Button>();

            RiverButton        = GameObject.Find("RiverButton").GetComponent <Button>();
            RiverDungeonButton = GameObject.Find("RiverDungeonButton").GetComponent <Button>();

            CastleButton        = GameObject.Find("CastleButton").GetComponent <Button>();
            CastleDungeonButton = GameObject.Find("CastleDungeonButton").GetComponent <Button>();

            QuitButton = GameObject.Find("Quit").GetComponent <Button>();

            //when the corresponding buttons are pressed the appropriate action needs to take place

            NewGameButton.onClick.AddListener(StartGame);
            ForestButton.onClick.AddListener(StartForest);
            ForestDungeonButton.onClick.AddListener(StartForestDungeon);
            RiverButton.onClick.AddListener(StartRiver);
            RiverDungeonButton.onClick.AddListener(StartRiverDungeon);
            CastleButton.onClick.AddListener(StartCastle);
            CastleDungeonButton.onClick.AddListener(StartCastleDungeon);
            QuitButton.onClick.AddListener(QuitGame);
        }
示例#3
0
        void Start()
        {
            //Set the basic stats. Also attach the appropriate scripts. These can be changed in the inspector for individual enemies
            patrol    = true;
            canAttack = true;

            joltAmount = 5f;

            PatrolScript = GetComponent <Enemy4DirectionPatrol>();
            ChaseScript  = GetComponent <EnemyChase>();
            Attack       = GetComponent <AttackScript>();

            currentDamage    = damage;
            currentHealth    = maxHealth;
            currentMoveSpeed = defaultMoveSpeed;

            CharRigidBody = GetComponent <Rigidbody2D>();

            enemyCollider = GetComponent <Collider2D>();

            canBeJolted = true;

            //Player stuff
            Player      = GameObject.Find("Player");
            PM          = Player.GetComponent <Player_Manager>();
            PlayerAudio = PM.PlayerExternalAudio;
        }
示例#4
0
        void Start()
        {
            /* Initialize Player Stuff */
            Player = GameObject.Find("Player");
            PM     = Player.GetComponent <Player_Manager>();

            /* CRUCIAL CHECK: Are we spawning from 'New Game' or not */
            if (PM.StartWithIntro)
            {
                PlayerAnim = Player.GetComponent <Animator>();
                PM.canMove = false;

                /* Initialize Girl Stuff */
                GNPC = Girl.GetComponent <NPC_Manager>();
                Anim = Girl.GetComponent <Animator>();
                StartCoroutine(InitiateScene());
                girlPoint1        = GameObject.Find("GirlWaypoint1").GetComponent <Transform>();
                girlPoint2        = GameObject.Find("GirlWaypoint2").GetComponent <Transform>();
                playerPoint1      = GameObject.Find("PlayerPoint1").GetComponent <Transform>();
                PM.StartWithIntro = false;
            }
            else
            {
                Destroy(GameObject.Find("DoNotExitHouse"));
                Destroy(GameObject.Find("CinematicTrigger"));
                Destroy(Girl);
                Destroy(this.gameObject);
            }
        }
示例#5
0
 // Use this for initialization
 void Start()
 {
     Anim            = GetComponent <Animator>();
     PlayerManager   = GetComponent <Player_Manager>();
     PlayerAudio     = PlayerManager.PlayerInternalAudio;
     nextSwordStrike = Time.time;
     nextBowAttack   = Time.time;
     nextBombAttack  = Time.time;
 }
示例#6
0
 // Use this for initialization
 void Start()
 {
     Player       = GameObject.Find("Player").GetComponent <Player_Manager>();
     Upgrade      = GetComponent <SpriteRenderer>().sprite;
     Rupees       = GameObject.Find("RupeeCount").GetComponent <RupeeCount>();
     Canvas       = transform.GetChild(0).gameObject;
     interactable = true;
     Upgrade.name = inspectorName;
 }
示例#7
0
 // Use this for initialization
 void Start()
 {
     Boss         = GameObject.Find("Ganon");
     GEM          = Boss.GetComponent <Ganon_Enemy_Manager>();
     MainCamera   = GameObject.Find("Main Camera").GetComponent <CameraFollow>();
     Player       = GameObject.Find("Player");
     PM           = Player.GetComponent <Player_Manager>();
     BossText     = GameObject.Find("BossText");
     BossTextText = BossText.GetComponent <Text>();
 }
示例#8
0
 // Use this for initialization
 void Start()
 {
     Char          = GameObject.Find("PhantomGanon").GetComponent <PhantomManager>();
     Player        = GameObject.Find("Player");
     PM            = Player.GetComponent <Player_Manager>();
     ganon         = GameObject.Find("PhantomGanon");
     PhM           = ganon.GetComponent <PhantomManager>();
     currentTarget = Player;
     speed         = 0.1f;
 }
示例#9
0
 // Use this for initialization
 void Start()
 {
     PlayerManager = GameObject.Find("Player").GetComponent <Player_Manager>();
     Chest         = GameObject.Find("ChestBow");
     Chest.SetActive(false);
     number = spawnPoints.Length;
     //Debug.Log(number);
     AliveEnemies         = new GameObject[number];
     MiniBossMusicTrigger = GameObject.Find("MiniBossMusicTrigger");
 }
示例#10
0
 // Use this for initialization
 void Start()
 {
     interacting    = false;
     DialogueCount  = 0;
     DialogueScript = GameObject.Find("DialogueManager").GetComponent <DialogueManager>();
     PlayerManager  = GameObject.Find("Player").GetComponent <Player_Manager>();
     PatrolScript   = GetComponent <NpcPatrol>();
     NPCAudios      = GetComponents <AudioSource>();
     NPCInternal    = NPCAudios[0];
     NPCExternal    = NPCAudios[1];
 }
示例#11
0
 // Use this for initialization
 void Start()
 {
     Boss             = GameObject.Find("Minotaur");
     MEM              = Boss.GetComponent <Minotaur_Enemy_Manager>();
     BossMusicTrigger = GameObject.Find("BossMusicTrigger").GetComponent <ChangeBackgroundMusic>();
     MainCamera       = GameObject.Find("Main Camera").GetComponent <CameraFollow>();
     Player           = GameObject.Find("Player");
     PM           = Player.GetComponent <Player_Manager>();
     BossText     = GameObject.Find("BossText");
     BossTextText = BossText.GetComponent <Text>();
 }
示例#12
0
 // Use this for initialization
 void Start()
 {
     Player         = GameObject.Find("Player");
     PM             = Player.GetComponent <Player_Manager>();
     SC             = GameObject.Find("SceneChanger").GetComponent <SceneChanger>();
     ButtonSound    = PM.PlayerInternalAudio;
     ContinueButton = GameObject.Find("ContinueButton").GetComponent <Button>();
     QuitButton     = GameObject.Find("QuitButton").GetComponent <Button>();
     ContinueButton.onClick.AddListener(ContinueGame);
     QuitButton.onClick.AddListener(QuitGame);
 }
示例#13
0
        // Use this for initialization
        void Start()
        {
            //These variables line up with the components created for the actual Player object in the Unity hierarchy

            PlayerManager = GetComponent <Player_Manager>();
            RBody         = GetComponent <Rigidbody2D>();
            Anim          = GetComponent <Animator>();

            // set initial speed to default and current speed to default
            playerSpeed = PlayerManager.defaultMoveSpeed * Time.deltaTime;
            PlayerManager.currentMoveSpeed = PlayerManager.defaultMoveSpeed + 1f;
        }
示例#14
0
        // Use this for initialization
        void Start()
        {
            //set up the screen and set to false so it doesnt show right away
            HudView     = GameObject.Find("HUD_Stat");
            Player      = GameObject.Find("Player");
            PM          = Player.GetComponent <Player_Manager>();
            PlayerAnim  = Player.GetComponent <Animator>();
            PlayerAudio = PM.PlayerInternalAudio;
            StatsView   = HudView.transform.GetChild(0).gameObject;
            StatsView.SetActive(false);

            screenOpen = false;
        }
示例#15
0
        void Start()
        {
            SC = GameObject.Find("SceneChanger").GetComponent <SceneChanger>();
            /* Initialize Player Stuff */
            Player            = GameObject.Find("Player");
            PM                = Player.GetComponent <Player_Manager>();
            PM.canAttack      = false;
            PM.canSwordAttack = false;
            PM.canBombAttack  = false;
            PM.canBowAttack   = false;
            SF                = GameObject.FindGameObjectWithTag("Fader").GetComponent <ScreenFader>();

            /* CRUCIAL CHECK: Are we spawning from 'New Game' or not */
            PlayerAnim = Player.GetComponent <Animator>();

            /* Initialize Girl Stuff */
            GNPC = Girl.GetComponent <NPC_Manager>();
            Anim = Girl.GetComponent <Animator>();
            Anim.SetFloat("direction_x", 0f);
            Anim.SetFloat("direction_y", -1f);
            girlPoint1    = GameObject.Find("GirlWaypoint1").GetComponent <Transform>();
            playerPoint1  = GameObject.Find("PlayerPoint1").GetComponent <Transform>();
            triforcePoint = GameObject.Find("TriforcePoint").GetComponent <Transform>();
        }
示例#16
0
 // Use this for initialization
 void Start()
 {
     Player       = GameObject.Find("Player").GetComponent <Player_Manager>();
     interactable = true;
 }
示例#17
0
 // Use this for initialization
 void Start()
 {
     SC            = GameObject.Find("SceneChanger").GetComponent <SceneChanger>();
     Player        = GameObject.Find("Player");
     PlayerManager = Player.GetComponent <Player_Manager>();
 }
示例#18
0
 // Use this for initialization
 void Start()
 {
     Player = GameObject.Find("Player").GetComponent <Player_Manager>();
     GetComponent <Text>().text = "";
 }
示例#19
0
 // Use this for initialization
 void Start()
 {
     PM          = GameObject.Find("Player").GetComponent <Player_Manager>();
     PlayerAudio = PM.PlayerInternalAudio;
     SC          = GameObject.Find("SceneChanger").GetComponent <SceneChanger>();
 }
示例#20
0
 // Use this for initialization
 void Start()
 {
     PM = GameObject.Find("Player").GetComponent <Player_Manager>();
 }
示例#21
0
 // Use this for initialization
 void Start()
 {
     player        = GameObject.Find("Player").GetComponent <Player_Manager>();
     creationEvent = false;
 }