Advertisement
Guest User

Untitled

a guest
Jan 24th, 2018
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.05 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4.  
  5. public class Player : MonoBehaviour, IPlayer
  6. {
  7.     //Some variables here
  8.     int MobCounter, Rank, Timer;
  9.     string NodeName, Channel; //Save this as int if nodes and channels have an index
  10.    
  11.     //Whatever the player should do else comes here
  12.    
  13.     private void OnMobKill() //Caused whenever any mob has been killed.
  14.     {
  15.         Timer = 0;
  16.         if (/*Get the players current node*/ != NodeName || /*Get the players current channel*/ != Channel)
  17.         {
  18.             MobCounter = 0;
  19.             Rank = 1;
  20.             NodeName = /*Get the players current node*/;
  21.             Channel = /*Get the players current channel*/;
  22.         }
  23.         else
  24.         {
  25.             MobCounter++;
  26.             if (MobCounter >= /*Get ((PlayerGearScore * 2) + 100)*/ && Rank < 5)
  27.             {
  28.                 MobCounter = 0;
  29.                 Rank++;
  30.             }
  31.         }
  32.     }
  33.    
  34.     //Count the timer up to 10 minutes (600 seconds) in the background
  35.    
  36.     private void Reset() //This method resets every value if the player doesnt kill anything within 10 minutes
  37.     {
  38.         if (Timer >= 600)
  39.             //Reset all other 4 values to default
  40.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement