public RunAwayAction(GameObject blob) { this.blob = blob; blobMovement = blob.GetComponent <BlobMovement>(); teamTag = blob.GetComponent <TaggedObject>().teamTag; blobStats = blob.GetComponent <BlobStats>(); }
/*void OnDrawGizmos() // To test colliders * { * Gizmos.color = Color.red; * Vector3 position = transform.position; * position.y += transform.localScale.y / 2; * Gizmos.DrawSphere(position, transform.localScale.x / 2); * }*/ void Start() { animationController = gameObject.GetComponent <AnimationController>(); blobStats = GetComponent <BlobStats>(); InitStats(); InitActions(); }
public EatAction(GameObject blob, List <List <ObjectTag> > edibleTagCombinations) { this.blob = blob; energy = blob.GetComponent <Energy>(); blobMovement = blob.GetComponent <BlobMovement>(); EdibleTagCombinations = edibleTagCombinations; blobStats = blob.GetComponent <BlobStats>(); }
public MeleeFightAction(GameObject blob) { this.blob = blob; blobMovement = blob.GetComponent <BlobMovement>(); blobAnimationController = blob.GetComponent <AnimationController>(); blobStats = blob.GetComponent <BlobStats>(); teamTag = blob.GetComponent <TaggedObject>().teamTag; blobAnimationController.OnKicked += DealDamage; }
// Start is called before the first frame update void Start() { health = GetComponentInParent <Health>(); blobStats = GetComponentInParent <BlobStats>(); }
// Start is called before the first frame update void Start() { energy = GetComponentInParent <Energy>(); blobStats = GetComponentInParent <BlobStats>(); }