Ejemplo n.º 1
0
    void Start()
    {
        _move  = GetComponent <MoveMotion>();
        _shoot = GetComponentInChildren <ShootSystem>();

        StartCoroutine("Action_Cor");
    }
    //突進攻撃
    private IEnumerator Dash_Attack()
    {
        int direction = transform.position.x > 0 ? -1 : 1;

        //移動
        _move.Start_Move(new Vector3(-200f * direction, 16f), 1);
        yield return(new WaitUntil(_move.End_Move));

        transform.localScale = new Vector3(-1 * direction, 1, 1);
        //予備動作
        GoAroundMotion _around_Motion = GetComponent <GoAroundMotion>();

        _around_Motion.Start_Motion(transform.position + new Vector3(4f * direction, 0), 720f);
        yield return(new WaitUntil(_around_Motion.Is_End_Motion));

        //突進
        UsualSoundManager.Instance.Play_Attack_Sound();
        _controller.Play_Dash_Attack_Effect();
        MoveMotion _motion = GetComponent <MoveMotion>();

        if (direction == 1)
        {
            _motion.Start_Move(0);
        }
        else
        {
            _motion.Start_Move(1);
        }
        yield return(new WaitForSeconds(2.13f));

        transform.localScale = new Vector3(1 * direction, 1, 1);
    }
Ejemplo n.º 3
0
 private void Mob_OnMove(int senderId, float x, float y, float z, ushort a, MoveMotion motion)
 {
     foreach (var player in GetAllPlayers(true))
     {
         Map.PacketFactory.SendMobMove(player.GameSession.Client, senderId, x, z, motion);
     }
 }
Ejemplo n.º 4
0
 public MobMove(int senderId, float x, float z, MoveMotion motion)
 {
     GlobalId = senderId;
     Motion   = motion;
     PosX     = x;
     PosZ     = z;
 }
Ejemplo n.º 5
0
 public CharacterMove(int characterId, float x, float y, float z, ushort a, MoveMotion motion)
 {
     CharId = characterId;
     Motion = motion;
     Angle  = a;
     PosX   = x;
     PosY   = y;
     PosZ   = z;
 }
 void Awake()
 {
     //取得
     _controller    = GetComponent <Aunn>();
     _attack        = GetComponent <AunnAttack>();
     _shoot         = GetComponentInChildren <AunnShoot>();
     _rigid         = GetComponent <Rigidbody2D>();
     _move          = GetComponent <MoveMotion>();
     foot_Collision = transform.Find("Foot").GetComponent <ChildColliderTrigger>();
 }
Ejemplo n.º 7
0
        public void Init(int ownerId, float x, float y, float z, ushort angle, MoveMotion motion)
        {
            _ownerId = ownerId;

            PosX       = x;
            PosY       = y;
            PosZ       = z;
            Angle      = angle;
            MoveMotion = motion;
        }
Ejemplo n.º 8
0
        private void InitWithType(string Value, Color TextColor, int FontSize)
        {
            var Txt = Transform_.GetComponent <Text>();

            Txt.text      = Value;
            Txt.color     = TextColor;
            Txt.fontSize  = FontSize;
            Txt.fontStyle = FontStyle.Bold;

            var Motion = new MoveMotion(0.8f, new Vector3(0, 40, 0), true);

            Transform_.ExecuteMotion(new SequenceMotion(Motion, new CallbackMotion(() => { IsAlive = false; })));
        }
 private void Awake()
 {
     //取得
     _controller       = GetComponent <Aunn>();
     _sprite           = GetComponent <SpriteRenderer>();
     _rigid            = GetComponent <Rigidbody2D>();
     _shoot            = GetComponentInChildren <AunnShoot>();
     _copy             = GetComponentInChildren <AunnCopy>();
     _copy_Shoot       = _copy.GetComponentInChildren <AunnShoot>();
     _effect           = GetComponentInChildren <AunnEffect>();
     _se               = GetComponentInChildren <SEManager>();
     _move_Const_Speed = GetComponent <MoveConstSpeed>();
     _move_Motion      = GetComponent <MoveMotion>();
     _move_Const_Time  = GetComponent <MoveConstTime>();
     foot_Collider     = transform.Find("Foot").GetComponent <ChildColliderTrigger>();
     player            = GameObject.FindWithTag("PlayerTag");
 }
Ejemplo n.º 10
0
    private void Awake()
    {
        m_MoveEventDispatcher = new MoveEventsDispatcher(this);
        m_MoveEventDispatcher.Awake();

        m_MoveMotion = new MoveMotion(this);
        m_MoveMotion.Awake();

        InitAnimator();
        m_IsInitialized = true;
        TransitionTo(CombatantMoveState.kIdle);
        for (int i = 0; i < InitializedSucc.Count; i++)
        {
            InitializedSucc[i]?.Invoke();
        }
        InitializedSucc.Clear();
    }
Ejemplo n.º 11
0
    private IEnumerator Shoot_Cor()
    {
        yield return(new WaitForSeconds(0.5f));

        _move = GetComponent <MoveMotion>();
        _move.Start_Move();

        yield return(new WaitForSeconds(1.0f));

        while (transform.position.y > -200f)
        {
            yield return(new WaitForSeconds(span));

            var bullet = bullet_Pool.GetObject();
            bullet.transform.position = transform.position;
        }
        _move.Stop_Move();
        Destroy(gameObject);
    }
Ejemplo n.º 12
0
 private void MovementManager_OnMove(int senderId, float x, float y, float z, ushort a, MoveMotion motion)
 {
     CancelCasting();
 }
Ejemplo n.º 13
0
 /// <summary>
 /// Notifies other players about position change.
 /// </summary>
 private void Character_OnMove(int senderId, float x, float y, float z, ushort a, MoveMotion motion)
 {
     // Send other clients notification, that user is moving.
     foreach (var player in GetAllPlayers(true))
     {
         Map.PacketFactory.SendCharacterMoves(player.GameSession.Client, senderId, x, y, z, a, motion);
     }
 }
Ejemplo n.º 14
0
 private void Awake()
 {
     _move = GetComponent <MoveMotion>();
 }