コード例 #1
0
ファイル: Player.cs プロジェクト: sachilds/Physics_BLMB
 public void DetachFromPlayer()
 {
     Debug.Log("Drop hat.");
     Hat.DetachFromPlayer(gameObject.GetComponent<Player>());
     currentHat = null;
     hatType = Hat.HatType.None;
 }
コード例 #2
0
ファイル: Player.cs プロジェクト: sachilds/Physics_BLMB
 public void AttachToPlayer()
 {
     Debug.Log("Pickup hat.");
     Hat.AttachToPlayer(gameObject.GetComponent<Player>(), closestHat);
     currentHat = closestHat;
     hatType = currentHat.hatType;
 }
コード例 #3
0
ファイル: Player.cs プロジェクト: sachilds/Physics_BLMB
    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;
    }