public override void loadData(SeedBase seed) { base.loadData(seed); GSeed h = (GSeed)seed; patrolStart = h.currentNode; }
public virtual void loadData(SeedBase seed) { Seed s = (Seed)seed; state = s.state; path = s.path; }
public override void loadData(SeedBase seed) { base.loadData(seed); PSeed p = (PSeed)seed; jumpTargetPos = p.jumpTargetPos; }
/// <summary> /// Loads the data from a seed. /// </summary> /// <returns>The seed.</returns> public void loadData(SeedBase s) { if (s == null) { return; } Seed seed = (Seed)s; bool check = false; Collider2D[] colsHit = Physics2D.OverlapBoxAll(transform.position + (Vector3)_offset, _range, 0); for (int i = 0; i < colsHit.Length; i++) { if (colsHit[i].GetComponentInParent <TetherIndicator>() != null) { check = true; } } _tetherInRange = check; if (seed.isActive) { enable(); } else { disable(); } }
public void loadData(SeedBase seed) { Seed s = (Seed)seed; movespeed = s.movespeed; abilities = s.abilities; statuses = s.statuses; }
public override void loadData(SeedBase seed) { base.loadData(seed); HSeed h = (HSeed)seed; patrolStart = h.currentNode; defaultState = h.defaultState; pursuitTarget = h.pursuitTarget; }
public void Created(SeedBase seedToEquip) { berrySprite = seedToEquip.GetBerrySprite(); infoName.text = seedToEquip.GetBerryName(); growthMultiplier = seedToEquip.GetGrowthMultiplier(); //playerValues.seedStage = 0; hasEquippedSeed = true; OnEnable(); }
public override void loadData(SeedBase seed) { base.loadData(seed); CSeed c = (CSeed)seed; home = c.home; sitDuration = c.sitDuration; standDuration = c.standDuration; returnTimer = c.returnTimer; }
/// <summary> /// Loads the data from a seed. /// </summary> /// <returns>The seed.</returns> public void loadData(SeedBase s) { if (s == null) { return; } Seed seed = (Seed)s; _state = seed.state; }
/// <summary> /// Loads the data from a seed. /// </summary> /// <returns>The seed.</returns> public void loadData(SeedBase s) { Seed seed = (Seed)s; _active = seed.isOn; _reverseMovement = seed.isReversed; _nextPoint = seed.nextPoint; _waitTimer = seed.waitingTime; }
/// <summary> /// Loads the data from a seed. /// </summary> /// <returns>The seed.</returns> public void loadData(SeedBase s) { Seed seed = (Seed)s; if (seed.isOpen) { Open(); } else { Close(); } }
public void loadData(SeedBase s) { Seed seed = (Seed)s; //m_codes = seed.codes; m_endTimer = seed.endTimer; m_useEndTimer = seed.endTimerActive; if (isDead) { isDead = false; } }
public void PlantBerry(SeedBase berry) //Stage 1 { berryPlantedAtTime = timeManager.GetTimeSeconds(); berryIsPlanted = true; berryGrowthPoints = 0; berryStage = 1; plantSprite.sprite = plantStageOne; plantedBerry = berry; plantedBerryName = berry.GetSeedName(); berryGrowthSpeed = berry.GetGrowthMultiplier(); plantStageFive = berry.GetBerryTileFinishedSprite(); berry.SetInactiveStatus(true); }
/// <summary> /// Loads the data from a seed. /// </summary> /// <returns>The seed.</returns> public void loadData(SeedBase s) { if (s == null) { return; } Seed seed = (Seed)s; if (seed.isPressed) { onInteract(); } }
public InventorySeed GetInventorySeed(SeedBase seed) { foreach (InventorySlot i in seedSlots) { SeedBase seed2 = i.GetChildHolder().GetComponentInChildren <SeedBase>(); if (seed2 != null) { if (seed.GetSeedName() == seed2.GetSeedName()) { return(i.GetChildHolder().GetComponentInChildren <InventorySeed>()); } } } return(null); }
public void loadData(SeedBase s) { if (s == null || inStasis) { return; } Seed seed = (Seed)s; _canMove = seed.canMove; _rb2d.velocity = Vector2.zero; _beingPushed = false; _rb2d.constraints = RigidbodyConstraints2D.FreezeRotation; }
private void HarvestBerry() { berryIsPlanted = false; berryPlantedAtTime = 0; plantSprite.sprite = plantStageZero; plantedBerryName = ""; plantedBerry.SetBerryStatus(true); plantedBerry.SetInactiveStatus(false); string itemIntro = "You picked up a"; string itemText = plantedBerry.GetBerryName(); GameObject popup = Instantiate(rewardbox, FindObjectOfType <RewardboxParent>().transform); popup.GetComponent <Rewardbox>().AssignInfo(itemIntro, itemText, plantedBerry.GetBerrySprite()); popup.GetComponent <Rewardbox>().SetRewardTextColor(new Color(63f / 255f, 202f / 255f, 184f / 255f)); plantedBerry = null; }
/// <summary> /// Loads the data from a seed. /// </summary> /// <returns>The seed.</returns> public void loadData(SeedBase s) { Seed seed = (Seed)s; if (ignoresTimeTether) { return; } if (seed.isOpen) { Open(); } else { Close(); } }
/// <summary> /// Loads the data from a seed. /// </summary> /// <returns>The seed.</returns> public void loadData(SeedBase s) { if (s == null) { return; } Seed seed = (Seed)s; if (seed.isOn) { enable(); } else { disable(); } }
public List <SeedBase> GetActiveSeeds() { List <SeedBase> seedList = new List <SeedBase>(); foreach (InventorySlot i in seedSlots) { SeedBase seed = i.GetChildHolder().GetComponentInChildren <SeedBase>(); if (seed != null) { if (!seed.GetInactiveStatus() && !seed.GetComponent <SeedBase>().GetBerryStatus()) { seedList.Add(seed); } } } return(seedList); }
/// <summary> /// Loads the data from a seed. /// </summary> /// <returns>The seed.</returns> public void loadData(SeedBase s) { if (s == null) { return; } Seed seed = (Seed)s; isTriggered = seed.triggered; if (seed.isEnabled) { enable(); } else { disable(); } }
/// <summary> /// Loads the data from a seed. /// </summary> /// <returns>The seed.</returns> public void loadData(SeedBase s) { Seed seed = (Seed)s; if (seed.isPressed) { _sprite.sprite = _pressedSprite; } else { _sprite.sprite = _unpressedSprite; } if (seed.canBePressed) { enable(); } else { disable(); } }
public void Created() { if (created) { return; } if (GetComponentInChildren <SeedBase>() != null) { SeedBase seed = GetComponentInChildren <SeedBase>(); seedName = seed.GetSeedName(); berryName = seed.GetBerryName(); seedText = seed.GetInfo(); seedSprite = seed.GetSeedSprite(); berrySprite = seed.GetBerrySprite(); timeText = seed.GetGrowthTimeString(); clockSprite = clock; created = true; } }
public void LoadTile() { BerryTileData data = SaveData.current.berryTiles.Find(x => x.id == id); if (data != default && data.berryIsPlanted) { id = data.id; berryIsPlanted = data.berryIsPlanted; berryStage = data.berryStage; berryPlantedAtTime = data.berryPlantedAtTime; berryGrowthSpeed = data.berryGrowthSpeed; berryGrowthPoints = data.berryGrowthPoints; Item itemSeed = Resources.Load("ScriptableObjects/Seeds/" + data.plantedBerryName) as Item; plantedBerry = FindObjectOfType <InventoryUI>().GetSeed(itemSeed.prefab.GetComponent <SeedBase>()); plantStageFive = plantedBerry.GetBerryTileFinishedSprite(); plantedBerryName = plantedBerry.GetSeedName(); ReloadBerries(); } FindObjectOfType <InventoryUI>().onInventoryFinishedLoadingCallback -= LoadTile; }
/// <summary> /// Loads the data from a seed. /// </summary> /// <returns>The seed.</returns> public void loadData(SeedBase s) { DeleteAllDialogueBoxes(); }
public void loadData(SeedBase s) { }
// --- ISavable Methods --- public SeedBase saveData() { SeedBase seed = new SeedBase(); return(seed); }
public void InitiateEquippedSeed(SeedBase seedToEquip) { EquippedInventorySeed seed = FindObjectOfType <EquippedInventorySeed>(); seed.Created(seedToEquip); }
/// <summary> /// Loads the data from a seed. /// </summary> /// <returns>The seed.</returns> public void loadData(SeedBase s) { Seed seed = (Seed)s; gameObject.SetActive(seed.isActive); }
/// <summary> /// Loads the data from a seed. /// </summary> /// <returns>The seed.</returns> public void loadData(SeedBase s) { Seed seed = (Seed)s; _active = seed.isOn; }