コード例 #1
0
 private void OnDestroy()
 {
     if (instance == this)
     {
         m_instance = null;
     }
 }
コード例 #2
0
 private void Awake()
 {
     if (!groundhogDay)
     {
         groundhogDay = FindObjectOfType <GroundhogDay>();
     }
     Debug.Assert(groundhogDay, "groundhogDay is null", this);
 }
コード例 #3
0
    private void Awake()
    {
        interactable = GetComponent <KeyCardReader>();

        if (!groundhogDay)
        {
            groundhogDay = FindObjectOfType <GroundhogDay>();
        }
        Debug.Assert(groundhogDay, "groundhogDay is null", this);

        interactable.interactEventComponent.onInteract.AddListener(OnInteract);
    }
コード例 #4
0
    private void Awake()
    {
        if (!groundhogDay)
        {
            groundhogDay = FindObjectOfType <GroundhogDay>();
        }
        Debug.Assert(groundhogDay, "groundhogDay is null", this);

        if (!player)
        {
            player = FindObjectOfType <PlayerController>();
        }
        Debug.Assert(player, "player is null", this);
    }
コード例 #5
0
        public void GroundhogDayYearTest(int year)
        {
            GroundhogDay holiday = new GroundhogDay();

            Assert.AreEqual(year, holiday.GetByYear(year).Year);
        }