コード例 #1
0
 public TestPlantSeedState(GameObject model, float spawnOddsPerDay, int maxSurvivalDays, TestPlantLeaf leaf, bool firstSeed)
 {
     _model            = model;
     _spawnOddsPerDay  = spawnOddsPerDay;
     _survivalDaysLeft = maxSurvivalDays;
     _leaf             = leaf;
     _firstSeed        = firstSeed;
 }
コード例 #2
0
        public void DeregisterLeaf(TestPlantLeaf leaf, bool freePosition)
        {
            _removeBuffer.Add(leaf);

            Plant plant = GetComponent <Plant>();

            if (freePosition)
            {
                plant.VegetationSys.RemoveOccupationAt(leaf.Position);
            }

            if (_testPlantSystem.Count == _removeBuffer.Count)
            {
                plant.VegetationSys.RemoveOccupationsBy(plant);
                Destroy(transform.parent.gameObject);
            }
        }
コード例 #3
0
 public TestPlantDormantState(TestPlantLeaf leaf)
 {
 }
コード例 #4
0
 public TestPlantFullyGrownState(TestPlantLeaf leaf)
 {
     _leaf = leaf;
 }
コード例 #5
0
 public TestPlantGrowingState(TestPlantLeaf leaf)
 {
     _leaf = leaf;
 }