Example #1
0
 /// <summary>
 /// Calculates the coeficients for scaling
 /// </summary>
 /// <param name="player"></param>
 /// <param name="enemy"></param>
 /// <returns></returns>
 public float CalculateCoeficient(PlayerController player, EnemyController enemy)
 {
     if (player.GetSize() > player.startsize * 2f)
     {
         return coeficient = 0.012f;
     }
     if (player.GetSize() > player.startsize * 4f)
     {
         return coeficient = 0.015f;
     }
     if (player.GetSize() > player.startsize * 6f)
     {
         return coeficient = enemy.GetSize() * 0.016f;
     }
     else
     {
         if (player.GetSize() < player.startsize * 2)
         {
             if (player.GetSize() <= player.startsize * 0.5f)
             {
                 return coeficient = enemy.GetSize() * 0.02f;
             }
             else
             {
                 return coeficient = enemy.GetSize() * 0.025f;
             }
         }
     }
     return coeficient;
 }
        void Start()
        {
            _instance = this;

            _uiHandler = GameObject.Find("Canvas").GetComponent<UIHandler>();
            _player = GameObject.Find("PlayerController").GetComponent<PlayerController>();
        }
Example #3
0
        public void Awake()
        {
            playerController = GetComponent<PlayerController>();

            leftHoldPosition = transform.FindChild("RelicHoldPositionLeft");
            rightHoldPosition = transform.Find("RelicHoldPositionRight");

            cameraShaker = CameraShaker.Get();
        }
Example #4
0
 public void Awake()
 {
     _camera = new PlayerCamera (this, Camera);
     _controller = new PlayerController (this);
 }
Example #5
0
 /// <summary>
 /// 
 /// </summary>
 /// <param name="player"></param>
 /// <param name="enemy"></param>
 /// <returns></returns>
 public virtual float ScaleObject(PlayerController player, EnemyController enemy)
 {
     step = Step();
         return size += CalculateCoeficient(player, enemy) * enemy.GetSize();
 }