// Use this for initialization public override void Start() { base.Start(); this.currentState = State.IDLE; this.normalFabLocal = (Transform)Instantiate(this.normalFab, transform.position, transform.rotation); this.normalFabLocal.parent = transform; this.normalFabLocal.localPosition += Vector3.up; this.animatedPlayer = transform.FindChild(BBSceneConstants.animatedEntity).GetComponent<BBAnimatedEntity>(); }
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); }