示例#1
0
    private void OnTriggerEnter2D(Collider2D collision)
    {
        if (collision.gameObject.CompareTag("island"))
        {
            IslandAttributes island = (IslandAttributes)collision.gameObject.GetComponent(typeof(IslandAttributes));
            islandID.text = "Home";

            if (controller.GetTutorStatus() == "move" || controller.GetTutorStatus() == "visit")
            {
                controller.SetVisiting(true);
            }

            if (controller.GetTutorStatus() == "visit")
            {
                tutorText.text = "\"When you get close enough to an island, you can dock " +
                                 "at that island by pressing enter. Why don't you try that now?\"";
            }

            enterPrompt.text = "Press Enter to dock.";
        }
    }