コード例 #1
0
    public override void Start()
    {
        LoadTutorialsSeen();

        tutorialAnimations      = this.transform.Find("TutorialAnimations");
        tutorialExtraAnimations = new List <TutorialExtraAnimation>(this.GetComponentsInChildren <TutorialExtraAnimation>());
        tutorialExtraAnimations.ForEach(tutorialExtraAnimation => tutorialExtraAnimation.AddEventListener(this.gameObject));

        onTutorialDoneTrigger = this.transform.Find("OnTutorialDoneTrigger").GetComponent <OnTutorialDoneTrigger>();
        onTutorialDoneTrigger.AddEventListener(this.gameObject);

        hills = new List <ITweenMovableObject>(
            this.transform.Find("mainCamera/Hills").GetComponentsInChildren <ITweenMovableObject>()
            );

        rooms = new List <Room>(this.GetComponentsInChildren <Room>());
        rooms.ForEach(room => room.AddEventListener(this.gameObject));

        docam         = this.GetComponentInChildren <DoCam>();
        docam.enabled = false;
        hand          = this.GetComponentInChildren <Hand>();
        hand.AddEventListener(this.gameObject);

        player = this.GetComponentInChildren <PlayerControl>();

        player.AddEventListener(this.gameObject);
        hand.AddEventListener(player.gameObject);

        LoadLastFinishedRoomType();

        if (lastEnteredRoomType != RoomType.NONE)
        {
            Room         foundRoom    = rooms.Find(room => room.roomType == lastEnteredRoomType);
            TutorialRoom tutorialRoom = foundRoom.GetComponent <TutorialRoom>();
            docam.enabled = true;
            DropPlayer(tutorialRoom.GetPlayerSpawnPoint());
        }
        else
        {
            DropPlayer();
        }
    }
コード例 #2
0
 public void StartDialogue(Dialogue dialogue, TutorialRoom roomManager)
 {
     dialogueController.gameObject.SetActive(true);
     dialogueController.StartDialogue(dialogue);
 }
コード例 #3
0
	// Use this for initialization
	void Start () {
		S = this;
	}