private void GetReferences() { player = GetComponentInParent <Player>(); rb2d = GetComponentInParent <Rigidbody2D>(); animator = GetComponentInParent <Animator>(); playerAudio = GetComponentInParent <PlayerAudio>(); playerActionsController = GetComponentInParent <PlayerActionsController>(); }
public void AdditionalAction(PlayerActionsController playerActions) { var shots = 100; for (var i = 0; i < shots; i++) { Shoot(playerActions).ShooterTag = "Player"; playerCamera.transform.Rotate(0, 3.6f, 0); } }
private void GetReferences() { deathController = GetComponent <DeathController>(); movementController = GetComponent <MovementController>(); playerActionsController = GetComponent <PlayerActionsController>(); respawnController = GetComponent <RespawnController>(); pushController = GetComponentInChildren <PushController>(); rotationController = GetComponent <RotationController>(); afterImageController = GetComponent <AfterImageController>(); animator = GetComponent <Animator>(); }
private IBullet Shoot(PlayerActionsController playerActions) { var bullet = Instantiate( projectile, playerCamera.transform.position, playerCamera.transform.rotation * new UnityEngine.Quaternion(50, 30, 30, 10), bulletsContainer.transform ); bullet.GetComponent <Rigidbody>().velocity = playerCamera.transform.TransformDirection(new Vector3(0f, 0f, playerActions.ShotSpeed)); var bulletStats = bullet.GetComponent <Bullet>(); bulletStats.ExistanceTime = 2f; bulletStats.HurtValue = playerActions.Damage; return(bullet.GetComponent <Bullet>()); }
void Awake() { movementController = GetComponent <PlayerMovementController>(); animationController = GetComponent <PlayerAnimationController>(); actionsController = GetComponent <PlayerActionsController>(); cameraControl = GetComponent <PlayerCameraController>(); entityTarget = this.GetComponentInChildren <EntityTargetingSystem>(); uiControl = GameObject.Find("UI").GetComponent <GameUIControl>(); weaponInst = new ItemInstance(); weaponInst.itemID = baseWeapon.itemID; weaponInst.quality = baseQuality; attackAction = GetWeapon().attackDetails; armorInst = new ItemInstance(); armorInst.itemID = baseArmor.itemID; armorInst.quality = baseQuality; artifactInst = new ItemInstance(); artifactInst.itemID = baseArtifact.itemID; artifactInst.quality = baseQuality; }
/* private SpriteRenderer render;*/ //Full //Full green private void Start() { // parentGObj = transform.parent.gameObject; // render = GetComponent<SpriteRenderer>(); //Player playerActionController = GetComponentInParent <PlayerActionsController>(); isPrey = playerActionController.Player.Prey; /*if (isPrey) * render.color = fullBarColorPray;*/ coolDownTime = playerActionController.PushCooldown; trapsCoolDown = playerActionController.TrapsCoolDown; playerActionController.Player.BecamePray.AddListener(BecamePray); playerActionController.OnPush.AddListener(StartBar); playerActionController.OnTrapThrow.AddListener(StartBarPrey); //emptyBarPos = new Vector3(-GetComponent<Renderer>().bounds.size.x, 0, 0); }
public void MainAction(PlayerActionsController playerActions) { Shoot(playerActions).ShooterTag = "Player"; }
public void AdditionalAction(PlayerActionsController playerActions) { // do nothing }
public void MainAction(PlayerActionsController playerActions) { // do nothing }