// Use this for initialization
 void Start()
 {
     this.gravity = BBPhysicsHelper.ObjectGravity(this.jumpHeight, this.timeToJumpApex);
     this.jumpVelocity = BBPhysicsHelper.JumpVelocity(this.gravity, this.timeToJumpApex);
     this.controller = gameObject.GetComponent<BBController3D>();
     transform.parent = GameObject.FindGameObjectWithTag(BBSceneConstants.playersTag).transform;
 }
 public void SetTargetPlayer(GameObject targetPlayer)
 {
     this.targetPlayer = targetPlayer;
     //Create array of non-main player objects
     this.targetController = this.targetPlayer.GetComponent<BBController3D>();
     this.targetPlayerBase = this.targetPlayer.GetComponent<BBBasePlayerController>();
     this.focusArea = new FocusArea(this.targetController.boxCollider.bounds, this.focusDimensions);
 }
Esempio n. 3
0
 public virtual void Start()
 {
     this.damageSpeech = transform.GetComponent<BBDamageSpeech>();
     this.controller = (transform.parent != null) ? gameObject.GetComponentInParent<BBController3D>() : gameObject.GetComponent<BBController3D>();
     this.animatedEntity = transform.FindChild(BBSceneConstants.animatedEntity).GetComponent<BBAnimatedEntity>();
     this.gridController = GameObject.FindGameObjectWithTag(BBSceneConstants.layoutControllerTag).GetComponent<BBGridController>();
     BoxCollider collider = GetComponent<BoxCollider>();
     this.boundX = (int)(collider.size.x * transform.localScale.x);
     this.boundY = (int)(collider.size.y * transform.localScale.y);
 }