Beispiel #1
0
 public void DetachFromPlayer()
 {
     Debug.Log("Drop hat.");
     Hat.DetachFromPlayer(gameObject.GetComponent<Player>());
     currentHat = null;
     hatType = Hat.HatType.None;
 }
Beispiel #2
0
 public void AttachToPlayer()
 {
     Debug.Log("Pickup hat.");
     Hat.AttachToPlayer(gameObject.GetComponent<Player>(), closestHat);
     currentHat = closestHat;
     hatType = currentHat.hatType;
 }
Beispiel #3
0
    void Awake()
    {
        base.Awake();

        playerInput = GetComponent<PlayerInputScript>();	//Get reference to PlayerInputScript component
        spawningEffect = Resources.Load("Prefabs/PorterEffect") as GameObject;

        spawningEffect = Resources.Load("Prefabs/portalEffect") as GameObject;

        if (currentHat)
            hatType = currentHat.hatType;
    }