Exemplo n.º 1
0
 public override void Clear()
 {
     // BOSS动画
     AnimationManager.GetInstance().RemoveAnimation(_bossAni);
     _bossAni = null;
     // 血条部分
     _bloodBarSp      = null;
     _bloodBarLayerTf = null;
     _segmentGoList.Clear();
     if (_weights != null)
     {
         _weights.Clear();
     }
     GameObject.Destroy(_enemyGo);
     // Boss位置提示
     if (_isShowPosHint)
     {
         List <object> datas = new List <object> {
             this, false
         };
         CommandManager.GetInstance().RunCommand(CommandConsts.ShowBossPosHint, datas);
     }
     _auraTf           = null;
     _scLifeGo         = null;
     _scLifeMesh       = null;
     _scLifeBorderMesh = null;
     _scLifeBorderTf   = null;
     _scLifeTf         = null;
     base.Clear();
     CommandManager.GetInstance().RunCommand(CommandConsts.RemoveBgDistortEffect);
 }
Exemplo n.º 2
0
 public override void Clear()
 {
     _enemyGo = null;
     _tf      = null;
     AnimationManager.GetInstance().RemoveAnimation(_enemyAni);
     _enemyAni = null;
 }
Exemplo n.º 3
0
 public void Clear()
 {
     // 人物动画
     AnimationManager.GetInstance().RemoveAnimation(_aniChar);
     _aniChar          = null;
     _charAniSp.sprite = null;
     _charAniSp        = null;
     _isCastingBomb    = false;
     // B
     if (_bomb != null)
     {
         _bomb.Clear();
         _bomb = null;
     }
     // 副武器
     _subLayerTrans = null;
     for (int i = 0; i < _subWeapons.Length; i++)
     {
         _subWeapons[i].Clear();
     }
     _subWeapons = null;
     // 销毁
     GameObject.Destroy(_character);
     _character = null;
     // 判定点
     GameObject.Destroy(_collisionPointTf.gameObject);
     _collisionPointTf = null;
     _rotatePointTf    = null;
     // 状态机
     _stateEnterFunc  = null;
     _stateExitFunc   = null;
     _stateUpdateFunc = null;
 }
Exemplo n.º 4
0
 public void SetAni(string aniId)
 {
     if (_enemyGo == null)
     {
         _enemyGo = ResourceManager.GetInstance().GetPrefab("Prefab/Boss", "Boss");
     }
     _enemyTf         = _enemyGo.transform;
     _bossAni         = AnimationManager.GetInstance().CreateAnimation <AnimationCharacter>(_enemyGo, "Animation", LayerId.Enemy);
     _bloodBarLayerTf = _enemyTf.Find("BloodBarLayer");
     _bloodBarLayerTf.gameObject.SetActive(false);
     _isShowBloodBar = false;
     _bloodBarSp     = _bloodBarLayerTf.Find("BloodBar").GetComponent <SpriteRenderer>();
     // 魔法阵
     _isShowAura = false;
     _auraTf     = _enemyTf.Find("MagicSquare");
     // 符卡血条
     _scLifeGo         = _enemyTf.Find("SpellCardLife").gameObject;
     _scLifeBorderTf   = _enemyTf.Find("SpellCardLife/Border");
     _scLifeBorderMesh = _scLifeBorderTf.GetComponent <MeshFilter>().mesh;
     _scLifeTf         = _enemyTf.Find("SpellCardLife/Life");
     _scLifeMesh       = _scLifeTf.GetComponent <MeshFilter>().mesh;
     PopulateMesh(_scLifeBorderMesh, 128, 16, 5);
     PopulateMesh(_scLifeMesh, 112, 16, 3);
     _isShowAura     = false;
     _isShowSCHpAura = false;
     // 默认动作
     _bossAni.Play(aniId, AniActionType.Idle, Consts.DIR_NULL);
 }
Exemplo n.º 5
0
 public PlayerUser(int X, int Y, string Nickname, Canvas GROD, Game game) : base(X, Y)
 {
     nickname           = Nickname;
     x                  = X;
     y                  = Y;
     animationCharacter = new AnimationCharacter(GROD, game, nickname, x, y);
 }
Exemplo n.º 6
0
 public PlayerUser(int X, int Y, byte Health, byte MovePoints, byte AreaVisibility, Canvas GROD, Game game) : base(X, Y, Health, MovePoints, AreaVisibility)
 {
     x                  = X;
     y                  = Y;
     health             = Health;
     movePoints         = MovePoints;
     areaVisibility     = AreaVisibility;
     animationCharacter = new AnimationCharacter(GROD, game, nickname, x, y);
 }
Exemplo n.º 7
0
 public override void SetEnemyAni(string aniId)
 {
     if (_enemyAni == null)
     {
         _enemyAni = AnimationManager.GetInstance().CreateAnimation <AnimationCharacter>(LayerId.Enemy);
         _enemyGo  = _enemyAni.GetAniParent();
         _tf       = _enemyGo.transform;
     }
     _enemyAni.Play(aniId, AniActionType.Idle, Consts.DIR_NULL);
 }
Exemplo n.º 8
0
 // Use this for initialization
 void Start()
 {
     stunTimer    = 0;
     stunDuration = 1.5f;
     speed        = 5f;
     jump         = 4000;
     grounded     = true;
     stunned      = false;
     playing      = true;
     //player = PLAYER.BLUE;
     anim          = transform.GetComponent <AnimationCharacter> ();
     loadingScreen = GameObject.FindGameObjectWithTag("LoadingScreen").
                     GetComponent <LoadingScreen>();
     destroyer = GameObject.FindGameObjectWithTag("Destroyer").
                 GetComponent <DestroyPlayer>();
     camer = GameObject.FindGameObjectWithTag("MainCamera").
             GetComponent <CameraMove>();
     winner = GameObject.FindGameObjectWithTag("Title").
              GetComponent <TextMesh>();
     dataLogic = GameObject.FindGameObjectWithTag("DataLogic").
                 GetComponent <DataLogic>();
 }
Exemplo n.º 9
0
 public void SetImageScreen(Canvas GROD, Game game)
 {
     animationCharacter = new AnimationCharacter(GROD, game, nickname, x, y);
 }