// ====================================================================================== // PROTECTED MEMBERS - RUNTIMEMONOBEHAVIOUR // ====================================================================================== override protected void StartPhase() { base.StartPhase(); InitializeValues(); m_rb = this.GetComponent <Rigidbody2D>(); m_collider = this.GetComponent <CompositeCollider2D>(); if (m_collider == null) { #if UNITY_EDITOR Debug.Assert(this.GetComponents <Collider2D>().Length == 1, this.gameObject.name + " - PlayerController : Player must have a single collider or many colliders with a composite collider!"); #endif m_collider = this.GetComponent <Collider2D>(); } m_collisionCtlr = this.gameObject.GetComponent <CollisionCtlr>(); m_input = this.GetComponent <PlayerInputCtlr>(); // state IsGrounded = false; IsWallSnapped = false; IsEjecting = false; IsDashing = false; ForwardDir = eDirection.Right; }
// ====================================================================================== // PUBLIC MEMBERS // ====================================================================================== override protected void StartPhase() { m_control = this.GetComponent <PlayerController>(); m_input = this.GetComponent <PlayerInputCtlr>(); IsAttacking = false; EquipWeap = eWeapon.Fists; PunchOffset.x = 1f; PunchOffset.y = 0.8f; PunchHitboxSize.x = 0.6f; PunchHitboxSize.y = 0.6f; m_fistStartDelay = 0.3f; SaberOffset.x = 1f; SaberOffset.y = 1f; ThrowSaberOffset.x = 1.1f; ThrowSaberOffset.y = 0.75f; SaberHitboxSize.x = 1f; SaberHitboxSize.y = 1f; m_saberStartDelay = 0.3f; m_numberOfBullets = 1; m_bulletsShot = 0; PistolOffset.x = 0.9f; PistolOffset.y = 0.95f; ThrowPistolOffset.x = 1.1f; ThrowPistolOffset.y = 1.35f; m_pistolStartDelay = 0.3f; StompOffset.x = 0; StompOffset.y = 0.1f; StompHitboxSize.x = 0.35f; StompHitboxSize.y = 0.01f; }
// ====================================================================================== // PUBLIC MEMBERS - DAMAGE METHODS // ====================================================================================== override protected void StartPhase() { m_player = this.GetComponentInParent <PlayerInputCtlr>(); m_nbLives = 1; IsDead = false; IsStunned = false; }
// ====================================================================================== protected override void StartPhase() { base.StartPhase(); m_input = this.gameObject.GetComponent <PlayerInputCtlr>(); }
public void MSG_Death() { PlayerInputCtlr playerInputCtlr = this.gameObject.GetComponent <PlayerInputCtlr>(); RoundReferee.RegisterDeath((int)playerInputCtlr.m_nbPlayer); }
// Use this for initialization void Start() { m_weapon = this.GetComponentInChildren <WeaponWatcher>(); m_input = this.GetComponent <PlayerInputCtlr>(); m_attack = this.GetComponent <PlayerAttack>(); }
// Use this for initialization void Start() { m_input = this.gameObject.GetComponent <PlayerInputCtlr>(); }