コード例 #1
0
 /*
  * public RatioGameConfig GetCurLevelConfig()
  * {
  *  RatioGameConfig config;
  *  levelConfig.TryGetValue(GetCurLevel, out config);
  *  if (config == null) Debug.LogError("Ratio Game Data Error!");
  *  return config;
  * }
  */
 void Reset()
 {
     curLevel = 1;
     health   = 3;
     right    = 0;
     wrong    = 0;
     if (ballGroup != null)
     {
         ballGroup.Clear();
         ballGroup = null;
     }
 }
コード例 #2
0
 public void WinOnce()
 {
     curLevel++;
     ballGroup.Clear();
     ballGroup = null;
     if (curLevel > GetMaxLevel)
     {
         Win();
     }
     else
     {
         Shoot();
     }
 }
コード例 #3
0
        public void TakeDamage()
        {
            healthbar.RemoveOneHealthIcon();
            health--;
            ballGroup.Clear();
            ballGroup = null;

            AdaptiveDifficultyManager.Instance.SetUserTalent("Lose", RatioHardManager.gameId);

            if (health <= 0)
            {
                Failed();
            }
            else
            {
                Shoot();
            }
        }
コード例 #4
0
        public void Fire()
        {
            //GameObject.Instantiate(ResourceManager.Instance.LoadBuildInResource<GameObject>("Scene", AssetType.Char));
            GameObject go = new GameObject();

            go.transform.position = origion.position;
            var group = go.AddComponent <BallGroup>();

            if (ballGroup != null)
            {
                Destroy(ballGroup.gameObject);
            }
            ballGroup = group;
            var dif   = AdaptiveDifficultyManager.Instance.GetGameDifficulty("BallCount", 10);
            int count = RatioHardManager.GetBallCount();
            int speed = RatioHardManager.GetBallSpeed();

            group.Init(speed, count);
        }
コード例 #5
0
ファイル: Ball.cs プロジェクト: Hengle/ClientFrameWork
 public void Init(int id, BallGroup parent)
 {
     this.id     = id;
     this.parent = parent;
 }
コード例 #6
0
ファイル: Ball.cs プロジェクト: Blizzardx/ClientFrameWork
 public void Init(int id, BallGroup parent)
 {
     this.id = id;
     this.parent = parent;
 }