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); }
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); } }
public MobMove(int senderId, float x, float z, MoveMotion motion) { GlobalId = senderId; Motion = motion; PosX = x; PosZ = z; }
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>(); }
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; }
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"); }
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(); }
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); }
private void MovementManager_OnMove(int senderId, float x, float y, float z, ushort a, MoveMotion motion) { CancelCasting(); }
/// <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); } }
private void Awake() { _move = GetComponent <MoveMotion>(); }