예제 #1
0
    static void Refresh()
    {
        // Get Player.
        player = GameObject.FindGameObjectWithTag("Player");

        // Get every item manually. Add more as needed.
        boots  = player.GetComponent <RocketBoots>();
        hammer = player.GetComponent <Sledgehammer>();

        // Clear the list and rebuild because it's the safest solution I can think of.
        // Again. Add more items as needed.
        gear.Clear();
        if (ConversationTrigger.GetToken("gear_rocketboots"))
        {
            gear.Add(boots);
        }
        if (ConversationTrigger.GetToken("gear_sledgehammer"))
        {
            gear.Add(hammer);
        }
    }
예제 #2
0
 // Use this for initialization
 void Start()
 {
     boots = Player.GetComponent <RocketBoots>();
 }