Exemple #1
0
 public RunAwayAction(GameObject blob)
 {
     this.blob    = blob;
     blobMovement = blob.GetComponent <BlobMovement>();
     teamTag      = blob.GetComponent <TaggedObject>().teamTag;
     blobStats    = blob.GetComponent <BlobStats>();
 }
Exemple #2
0
    /*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();
    }
Exemple #3
0
 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>();
 }
Exemple #4
0
 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;
 }
Exemple #5
0
 // Start is called before the first frame update
 void Start()
 {
     health    = GetComponentInParent <Health>();
     blobStats = GetComponentInParent <BlobStats>();
 }
Exemple #6
0
 // Start is called before the first frame update
 void Start()
 {
     energy    = GetComponentInParent <Energy>();
     blobStats = GetComponentInParent <BlobStats>();
 }