コード例 #1
0
 private void GoHomeEnd()
 {
     fadeOutScreen.OnDarkeningEnd -= GoHomeEnd;
     if (BaseState.Instance != null)
     {
         Polyjam2019.CharacterEquipment equipment         = FindObjectOfType <Polyjam2019.CharacterEquipment>();
         Dictionary <Resource, int>     resourcesGathered = new Dictionary <Resource, int>();
         foreach (PickableData data in equipment.GetItemsIterator())
         {
             if (!resourcesGathered.ContainsKey(data.Resource))
             {
                 resourcesGathered.Add(data.Resource, data.Amount);
             }
             else
             {
                 resourcesGathered[data.Resource] += data.Amount;
             }
         }
         BaseState.Instance.ChangeValuesOfResources(resourcesGathered);
     }
     Application.LoadLevel("Base");
 }
コード例 #2
0
 private void Awake()
 {
     equipment = GetComponent <CharacterEquipment>();
 }