public override void initialize()
 {
     attackType = AttackType.ThrowAttack;
     eventHandler = GameManager.playerAnimator.gameObject.GetComponent<AnimationEventBroadcast>();
     eventHandler.subscribe(this);
     tongue = GameManager.player.GetComponent<PlayerController> ().playerTongueColliderObject;
     //weaponEffects = weapon.GetComponentInChildren<Xft.XWeaponTrail>();
 }
    public void OnTriggerEnter(Collider collider)
    {
        eventHandler = GameManager.playerAnimator.gameObject.GetComponent<AnimationEventBroadcast>();
        eventHandler.subscribe(this);
        if(collider.tag=="Player" && !disappearing){
            GameManager.playerAnimator.SetTrigger("isGrabbingHealth");
            disappearing = true;
            GameManager.player.GetComponent<PlayerController>().gainLife(lifeToGain);

            StartCoroutine("disappear");
        }
    }
示例#3
0
    public override void initialize()
    {
        attackType   = AttackType.Combo;
        eventHandler = GameManager.playerAnimator.gameObject.GetComponent <AnimationEventBroadcast>();
        eventHandler.subscribe(this);

        stick = GameManager.player.GetComponent <PlayerController>().weapon.GetComponentInChildren <Collider>();
        leg   = GameManager.player.GetComponent <PlayerController> ().playerLegObject.GetComponent <Collider> ();
        fist  = GameManager.player.GetComponent <PlayerController> ().playerFistObject.GetComponent <Collider> ();

        attackColliderStick = GameManager.player.GetComponent <PlayerController>().weapon.GetComponentInChildren <AttackCollider>();
        attackColliderLeg   = GameManager.player.GetComponent <PlayerController> ().playerLegObject.GetComponent <AttackCollider> ();
        attackColliderFist  = GameManager.player.GetComponent <PlayerController> ().playerFistObject.GetComponent <AttackCollider> ();
        weaponEffects       = GameManager.player.GetComponent <PlayerController>().weapon.GetComponentInChildren <Xft.XWeaponTrail>();
        slashController     = GameManager.player.GetComponent <PlayerController>().weapon.GetComponentInChildren <SlashController>();
        enemiesHit          = new List <GameObject> (0);
        //weaponEffects.StopSmoothly(0.1f);
    }
示例#4
0
 public override void initialize()
 {
     attackType   = AttackType.Shockwave;
     eventHandler = GameManager.playerAnimator.gameObject.GetComponent <AnimationEventBroadcast>();
     eventHandler.subscribe(this);
 }
 //Variables that need to be initialized at the beginning
 public override void initialize()
 {
     explosionScale =  new Vector3(extraScaleExplosion,extraScaleExplosion,extraScaleExplosion);
     originalScale = kameEffect.transform.localScale;
     attackType = AttackType.KameDirectional;
     eventHandler = GameManager.playerAnimator.gameObject.GetComponent<AnimationEventBroadcast>();
     eventHandler.subscribe(this);
     Color trailsColor = kameCore.GetComponent<ParticleSystemRenderer> ().material.GetColor("_TintColor");
     TrailRenderer tr = kameEffect.GetComponent<TrailRenderer>();
     TrailRenderer[] renderers = kameEffect.GetComponentsInChildren<TrailRenderer> ();
     for(int i = 0;i<renderers.Length;++i){
         renderers[i].material.color = trailsColor;
     }
     tr.material.color = trailsColor;
 }
 public override void initialize()
 {
     attackType = AttackType.Kame;
     eventHandler = GameManager.playerAnimator.gameObject.GetComponent<AnimationEventBroadcast>();
     eventHandler.subscribe(this);
     Color trailsColor = kameCore.GetComponent<ParticleSystemRenderer> ().material.GetColor("_TintColor");
     TrailRenderer tr = kameEffect.GetComponent<TrailRenderer>();
     TrailRenderer[] renderers = kameEffect.GetComponentsInChildren<TrailRenderer> ();
     for(int i = 0;i<renderers.Length;++i){
         renderers[i].material.color = trailsColor;
     }
     tr.material.color = trailsColor;
 }
 public override void initialize()
 {
     attackType = AttackType.Shockwave;
     eventHandler = GameManager.playerAnimator.gameObject.GetComponent<AnimationEventBroadcast>();
     eventHandler.subscribe(this);
 }
    public override void initialize()
    {
        attackType = AttackType.Combo;
        eventHandler = GameManager.playerAnimator.gameObject.GetComponent<AnimationEventBroadcast>();
        eventHandler.subscribe(this);

        stick = GameManager.player.GetComponent<PlayerController>().weapon.GetComponentInChildren<Collider>();
        leg = GameManager.player.GetComponent<PlayerController> ().playerLegObject.GetComponent<Collider> ();
        fist = GameManager.player.GetComponent<PlayerController> ().playerFistObject.GetComponent<Collider> ();

        attackColliderStick = GameManager.player.GetComponent<PlayerController>().weapon.GetComponentInChildren<AttackCollider>();
        attackColliderLeg = GameManager.player.GetComponent<PlayerController> ().playerLegObject.GetComponent<AttackCollider> ();
        attackColliderFist = GameManager.player.GetComponent<PlayerController> ().playerFistObject.GetComponent<AttackCollider> ();
        weaponEffects = GameManager.player.GetComponent<PlayerController>().weapon.GetComponentInChildren<Xft.XWeaponTrail>();
        slashController = GameManager.player.GetComponent<PlayerController>().weapon.GetComponentInChildren<SlashController>();
        enemiesHit = new List<GameObject> (0);
        //weaponEffects.StopSmoothly(0.1f);
    }