public EarthSpirit(Unit9 owner, MultiSleeper abilitySleeper, Sleeper orbwalkSleeper, ControllableUnitMenu menu) : base(owner, abilitySleeper, orbwalkSleeper, menu) { this.ComboAbilities = new Dictionary <AbilityId, Func <ActiveAbility, UsableAbility> > { { AbilityId.earth_spirit_boulder_smash, x => this.smash = new BoulderSmash(x) }, { AbilityId.earth_spirit_rolling_boulder, x => this.rolling = new RollingBoulder(x) }, { AbilityId.earth_spirit_geomagnetic_grip, x => this.grip = new GeomagneticGrip(x) }, { AbilityId.earth_spirit_magnetize, x => this.mag = new AoeAbility(x) }, { AbilityId.earth_spirit_stone_caller, x => this.stone = new StoneRemnant(x) }, //{ AbilityId.earth_spirit_petrify, x => this.petrify = new NukeAbility(x) }, { AbilityId.item_blink, x => this.blink = new BlinkAbility(x) }, { AbilityId.item_swift_blink, x => this.blink = new BlinkAbility(x) }, { AbilityId.item_arcane_blink, x => this.blink = new BlinkAbility(x) }, { AbilityId.item_overwhelming_blink, x => this.blink = new BlinkAbility(x) }, { AbilityId.item_force_staff, x => this.force = new ForceStaff(x) }, { AbilityId.item_spirit_vessel, x => this.vessel = new DebuffAbility(x) }, { AbilityId.item_urn_of_shadows, x => this.urn = new DebuffAbility(x) }, { AbilityId.item_veil_of_discord, x => this.veil = new DebuffAbility(x) }, { AbilityId.item_blade_mail, x => this.bladeMail = new ShieldAbility(x) }, { AbilityId.item_heavens_halberd, x => this.halberd = new DisableAbility(x) }, { AbilityId.item_shivas_guard, x => this.shiva = new DebuffAbility(x) }, }; this.MoveComboAbilities.Add(AbilityId.earth_spirit_rolling_boulder, x => this.rollingBlink = new RollingBoulderBlink(x)); this.MoveComboAbilities.Add(AbilityId.earth_spirit_stone_caller, x => this.stoneBlink = new StoneRemnantBlink(x)); this.MoveComboAbilities.Add(AbilityId.earth_spirit_boulder_smash, _ => this.smash); }
public override void Start() { // Calling parent Start function base.Start(); // Reference to script rollingBoulderScript = gameObject.GetComponent <RollingBoulder>(); }
void SpawnRocks() { for (int i = 0; i < numRocks; i++) { Vector3 dropPosition = new Vector3(UnityEngine.Random.Range(-4, 5), UnityEngine.Random.Range(-3, 4), 0.0f); BoulderLocation newLocation = new BoulderLocation(dropPosition); if (!rocks.ContainsKey(newLocation)) { RollingBoulder boulderObj = (RollingBoulder)Instantiate(boulder, dropPosition, Quaternion.identity); rocks.Add(newLocation, boulderObj); } } //numRocks+=2; }
// Update is called once per frame void Update() { if (!Globals.canvas.dialogue) { currentFrame++; if (currentBoulder) { currentBoulder.StartRolling(direction); currentBoulder = null; } if (active && currentFrame > framesBetweenBoulders) { currentFrame = 0; SummonBoulder(); } } }
void OnTriggerEnter2D(Collider2D other) { if (other.gameObject.tag == "Player") { PlayerGridObject player = other.GetComponent <PlayerGridObject>(); if (player.platforms <= 0) { player.TakeDamage(100); //player.gameObject.transform.position = Globals.spawnLocation; //StartCoroutine(screenBlackout()); } } RollingBoulder boulder = other.GetComponent <RollingBoulder>(); if (boulder) { boulder.StartCrumbling(); } }
void SummonBoulder() { currentBoulder = ((GameObject)Instantiate(boulder, this.gameObject.transform.position, Quaternion.identity)).GetComponent <RollingBoulder>(); }
// Token: 0x060007F8 RID: 2040 RVA: 0x000246B4 File Offset: 0x000228B4 public override bool Combo(TargetManager targetManager, ComboModeMenu comboModeMenu) { AbilityHelper abilityHelper = new AbilityHelper(targetManager, comboModeMenu, this); if (abilityHelper.UseAbility(this.blink, 400f, 200f)) { RollingBoulder rollingBoulder = this.rolling; if (rollingBoulder != null) { rollingBoulder.Sleeper.Sleep(0.8f); } base.ComboSleeper.ExtendSleep(0.1f); return(true); } if (abilityHelper.UseAbility(this.force, 400f, 200f)) { RollingBoulder rollingBoulder2 = this.rolling; if (rollingBoulder2 != null) { rollingBoulder2.Sleeper.Sleep(0.8f); } base.ComboSleeper.ExtendSleep(0.1f); return(true); } if (abilityHelper.UseAbility(this.veil, true)) { return(true); } if (abilityHelper.CanBeCasted(this.rolling, true, true, true, true)) { if (abilityHelper.UseAbility(this.rolling, true)) { return(true); } if (abilityHelper.CanBeCasted(this.stone, false, true, true, true)) { if (abilityHelper.ForceUseAbility(this.stone, true, true)) { BoulderSmash boulderSmash = this.smash; if (boulderSmash != null) { boulderSmash.Sleeper.Sleep(1f); } return(true); } } else if (abilityHelper.ForceUseAbility(this.rolling, true, true)) { return(true); } } if (abilityHelper.CanBeCasted(this.smash, true, true, true, true)) { if (abilityHelper.UseAbility(this.smash, true)) { return(true); } if (abilityHelper.CanBeCasted(this.stone, false, true, true, true)) { if (this.stone.UseAbility(targetManager, base.ComboSleeper, this.smash)) { return(true); } } else if (abilityHelper.ForceUseAbility(this.smash, true, true)) { return(true); } } if (abilityHelper.CanBeCasted(this.grip, true, true, true, true)) { if (abilityHelper.UseAbility(this.grip, true)) { return(true); } if (abilityHelper.CanBeCasted(this.stone, false, true, true, true)) { if (this.stone.UseAbility(targetManager, base.ComboSleeper, this.grip)) { return(true); } } else if (abilityHelper.ForceUseAbility(this.grip, true, true)) { return(true); } } return(abilityHelper.UseAbility(this.halberd, true) || abilityHelper.UseAbility(this.mag, true) || abilityHelper.UseAbility(this.vessel, true) || abilityHelper.UseAbility(this.urn, true) || abilityHelper.UseAbility(this.shiva, true) || abilityHelper.UseAbility(this.bladeMail, true) || abilityHelper.UseAbility(this.stone, true)); }