void Start() { rb = GetComponent <Rigidbody2D>(); animator = GetComponent <Animator>(); playerAttack = GetComponent <Player_Attack>(); health = GetComponent <Health>(); }
void Start() { rb = GetComponent <Rigidbody2D>(); state = GetComponent <Player_State>(); animator = GetComponent <Player_Animator>(); timers = GetComponent <Player_Timers>(); attributes = state.attributes; wallActions = GetComponent <Player_Wall_Actions>(); pJump = GetComponent <Player_Jump>(); pDash = GetComponent <Player_Dash>(); pDive = GetComponent <Player_Dive>(); pCol = GetComponent <Player_Collisions>(); pAttack = GetComponent <Player_Attack>(); move = GetComponent <Player_Move>(); playerManager = GetComponent <PlayerManager>(); rb.drag = 0.5f; rb.mass = 1.5f; ReceiveValues(); moveSpeed = attributes.moveSpeed; jumpVelocity = attributes.jumpVelocity; maxDescendAngle = attributes.maxDescendAngle; dashSpeed = attributes.dashSpeed; momentumFactor = attributes.momentumFactor; wallSlideSpeed = attributes.wallSlideSpeed; pivotTime = attributes.pivotTime; diveAttackTime = attributes.diveAttackTime; momentumTime = attributes.momentumTime; wallStickCooldown = attributes.wallStickCooldown; terminalVel = new Vector2(dashSpeed / 2.0f, dashSpeed / 2.5f); airTerminalVel = new Vector2(dashSpeed / 3.0f, dashSpeed); slopeCollisionMask = attributes.slopeCollisionMask; gravity = attributes.gravity; }
void Start() { pc = GetComponent <Player_Con>(); animator = GetComponent <Player_Animator>(); timers = GetComponent <Player_Timers>(); pDash = GetComponent <Player_Dash>(); pJump = GetComponent <Player_Jump>(); pDive = GetComponent <Player_Dive>(); pCol = GetComponent <Player_Collisions>(); pAttack = GetComponent <Player_Attack>(); wallActions = GetComponent <Player_Wall_Actions>(); speedManager = GetComponent <Speed_Manager>(); ReceiveValues(); jumpTime = attributes.jumpTime; displacementTime = attributes.displacementTime; pivotTime = attributes.pivotTime; momentumTime = attributes.momentumTime; wallStickCooldown = attributes.wallStickCooldown; jumpCount = 2; sign = 0.0f; prevSign = 1.0f; wallSign = 0.0f; jumpDirX = 0.0f; enemyColSign = 0.0f; control = true; airborne = true; //Lines below for testing purposes dive = true; dash = true; doubleJump = true; }
public List <string> enemylist; //record those enemies got hit to avoid double collision check void Awake() { Instance = this; IsAttack = false; CheckDistance = false; enemylist = new List <string>(); enemylist.Clear(); }
private void Awake() { if (instance != null) { Debug.Log("Déjà Player_Attack dans la scène"); return; } instance = this; }
void Awake() { anim = GetComponent <Animator>(); playerAudio = GetComponent <AudioSource>(); playerMovement = GetComponent <Player_Controller_Movement>(); playerAttack = GetComponentInChildren <Player_Attack>(); gMs = FindObjectOfType <GameManager>(); currentHealth = startingHealth; }
public void Start() { player = Player_Manager.Instance.player_script; player_move = Player_Manager.Instance.player_move; player_attack = Player_Manager.Instance.player_attack; action_stair = Player_Manager.Instance.action_stair; actor_status = Actor_Manager.Instance.actor_status; layer = Dungeon_Manager.Instance.map_layer_2D; key_observer = Game.Instance.key_observer; }
private void Shot() { if (PlayerPrefs.GetInt("HangrightState") == 1) { Player_Attack weapon = GetComponent <Player_Attack>(); if (weapon != null) { // false because the player is not an enemy weapon.Attack(false); } FindObjectOfType <AudioManager>().Play("FireBall"); } }
void Update() { if (currentEnemyHealth <= 0) { int chancesOfDropping = Random.Range(0, 100); if (chancesOfDropping <= 100) { Instantiate(egg, transform.position, transform.rotation); } Player_Attack pAs = GameObject.FindGameObjectWithTag("Player").GetComponentInChildren <Player_Attack>(); pAs.specialAbilityBar += deathPoints; Mathf.Clamp(pAs.specialAbilityBar, 0, 100); pAs.sAI.fillAmount = pAs.specialAbilityBar / 100;// Destroy(this.gameObject); } }
private Player_Attack Skill; //Allows access to demo lightning skill private void Start() { player = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Movement>(); Experience = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Attack>(); Skill = GameObject.FindGameObjectWithTag("Player").GetComponent <Player_Attack>(); }
void Start() { player_attack = gameObject.AddComponent <Player_Attack>(); }
private void Awake() { playerAttack = GetComponentInChildren <Player_Attack>(); }