Esempio n. 1
0
 void Awake()
 {
     fpsi=(FPSInputController)FindObjectOfType(typeof(FPSInputController));
     cc=(CharacterController)FindObjectOfType(typeof(CharacterController));
     ml=(MouseLook)FindObjectOfType(typeof(MouseLook));
     pc = (PlayerClicker)FindObjectOfType(typeof(PlayerClicker));
 }
Esempio n. 2
0
 void Awake()
 {
     fpsi = (FPSInputController)FindObjectOfType(typeof(FPSInputController));
     cc   = (CharacterController)FindObjectOfType(typeof(CharacterController));
     ml   = (MouseLook)FindObjectOfType(typeof(MouseLook));
     pc   = (PlayerClicker)FindObjectOfType(typeof(PlayerClicker));
 }
Esempio n. 3
0
    private void OnTriggerExit(Collider other)
    {
        PlayerClicker clicker = other.gameObject.GetComponent <PlayerClicker>();

        if (clicker != null)
        {
            clicker.CanDrop = false;
        }
        showDropSite(false);
    }
Esempio n. 4
0
    public Idler(IdlerObject idob, PlayerIdlers master)
    {
        IdlerObject    = idob;
        _playerIdler   = master;
        _playerClicker = PlayerClickerFactory.GetClicker(IdlerObject.name);

        UpdateIdler();


        OnLevelUpCallback += UpdateIdler;
        OnLevelUpCallback += _playerIdler.UpdateTotalIdlerDamage;
        OnLevelUpCallback += _playerIdler.UpdateTotalIdlerManaCost;
        Player.Instance.OnEquipCallback += UpdateIdler;
    }
Esempio n. 5
0
    private void OnTriggerStay(Collider other)
    {
        PlayerClicker clicker = other.gameObject.GetComponent <PlayerClicker>();

        if (clicker != null && clicker.Carrying && empty)
        {
            //if the player is in the trigger it will only be able to drop the light if it's in sight
            clicker.CanDrop  = inSight;
            clicker.DropSite = this;
            if (!showing)
            {
                showDropSite(inSight);
            }
            else if (!inSight && showing)
            {
                showDropSite(inSight);
            }
        }
    }