override Update(MyInputSystem input, flaot dt)
 {
     if (input.MouseClicked && Bounds.Contains(input.MousePosition))
     {
         Click(this, new EventArgs());
     }
 }
 // Forumla to calculate spline points
 public float SplineEqu(float t, float dimension, float inDimension, flaot outDimension)
 {
     return((((2 * Mathf.Pow(t, 3)) - (3 * Mathf.Pow(t, 2)) + 1) * dimension) +
            ((Mathf.Pow(t, 3) - (2 * Mathf.Pow(t, 2)) + t) * inDimension) +
            (((-2 * Mathf.Pow(t, 3)) + (3 * Mathf.Pow(t, 2))) * dimension) +
            ((Mathf.Pow(t, 3) - Mathf.Pow(t, 2)) * outDimension));
 }
示例#3
0
 public IRnumerable Attack()
 {
     foreach (Enemy enemy in this.enemies)
     {
         flaot damage = enemy.Attack();
         yield return(damage);
     }
     ;
 }
示例#4
0
 void Update()
 {
     if (isDead)
     {
         return;
     }
     if (score > scoreToMaxLevel)
     {
         LevelUp();
     }
     score += Time.DeltaTime * difficultyLevel;
     //Debug.Log(score);
     //setting the incresed score at the time of game playing
     scoreText.text = ((int)score).ToString();
 }
 public int area()
 {
     area = radius * radius * pi;
 }