private void Awake()
    {
        if (photonView.isMine)
        {
            if (localPlayer == null)
            {
                localPlayer = this;
            }
        }

        myHammer = GetComponentInChildren <Hammer>();
        hitStop  = GetComponent <HitStopPlayer>();
    }
예제 #2
0
 private void Awake()
 {
     //Get components
     anim    = GetComponent <Animator>();
     col     = GetComponent <Collider>();
     hitStop = GetComponent <HitStopPlayer>();
     //set spawn position and rotate to face the camera
     spawnPos           = transform.position;
     transform.rotation = Quaternion.Euler(new Vector3(0, 180, 0));
     //subscribe to events
     if (MoleManager.Instance)
     {
         MoleManager.Instance.onRaiseMoles   += RiseUp;
         MoleManager.Instance.onRetractMoles += Retract;
     }
 }