예제 #1
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);
            }
        }
예제 #2
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>();
        }