Beispiel #1
0
 public override void Interact(BattlePlayer p)
 {
     if (!moving)
     {
         tno.Send("TriggerInteraction", Target.AllSaved);
     }
 }
Beispiel #2
0
 public override bool CanInteract(BattlePlayer p)
 {
     if (p.Tool == BattlePlayer.PlayerTool.Pickaxe)
     {
         return(true);
     }
     return(false);
 }
Beispiel #3
0
 public void PlayerSpawned(BattlePlayer p)
 {
     if (!p.tno.isMine)
     {
         return;
     }
     OrbitCam.Priority = 5;
     p.ToggleAim(false);
 }
Beispiel #4
0
 protected override void Awake()
 {
     base.Awake();
     if (tno.isMine)
     {
         instance = this;
     }
     Settings      = BattleGameObjects.instance.settings;
     _battlePlayer = GetComponent <BattlePlayer>();
     mRb           = GetComponent <Rigidbody>();
 }
Beispiel #5
0
 public override void Interact(BattlePlayer p)
 {
     hits++;
     Health--;
     tno.Send("Sync", Target.OthersSaved, hits, Health);
     if (hits == hitsToResource || Health == 0)
     {
         p.AddResource(hits);
         hits = 0;
     }
     CheckDamage();
     StartCoroutine(DamageReactions.QuickScale(transform, 3));
 }
Beispiel #6
0
        public void SetFreeLookTarget(BattlePlayer p)
        {
            if (!p.tno.isMine)
            {
                return;
            }
            OrbitCam.Priority = 5;

            /*
             * CharacterFreeLook.m_Follow = p.transform;
             * CharacterFreeLook.m_LookAt = p.rotationPoint.transform;
             * CharacterFreeLook.Priority = 10;
             */
        }
Beispiel #7
0
        protected override void Awake()
        {
            base.Awake();
            GameCameras = new GameCamera[2];
            gameEvents  = BattleGameObjects.instance.gameEvents;

            weaponRecoil = GetComponent <RootMotion.FinalIK.Recoil>();
            if (tno.isMine)
            {
                BattlePlayer.instance = this;
                aimCamera             = BattleGameCameraManager.instance.AimCam;
                followCamera          = BattleGameCameraManager.instance.FollowCam;
                onStanceChanged(stanceManger.Stance);
                //gameCamera = GameCameras[0];
                tno.Send("ToggleAim", Target.AllSaved, false);
            }
        }
 private void Awake()
 {
     bpInput = BattlePlayerInput.instance;
     bPlayer = BattlePlayer.instance;
 }
Beispiel #9
0
 public void onGameOver(BattlePlayer p)
 {
     hudScreen.alpha = 0;
     gameOverScreen.alpha = 0;
 }
Beispiel #10
0
 public virtual void Interact(BattlePlayer p)
 {
     throw new System.NotImplementedException();
 }
Beispiel #11
0
 public virtual bool CanInteract(BattlePlayer p)
 {
     return(true);
 }