Esempio n. 1
0
        public void OntoStage(Vector2 position)
        {
            Object.Destroy(entity);
            entity = Object.Instantiate(ResourceReader.Plants[type]);

            entity.name = "Pla" + id.ToString();
            entity.transform.position = TerrainLogic.Project(position);
            entity.transform.Rotate(new Vector3(0, id % 6 * 60, 0));
            float rate = (float)day / (float)PlantLibrary.MatureDay[type];

            entity.transform.localScale = rate >= 1 ? new Vector3(1, 1, 1) : new Vector3(rate, rate, rate);
        }
Esempio n. 2
0
        public void OntoStage(Vector2 position)
        {
            Object.Destroy(flesh);

            if (gender)
            {
                flesh = Object.Instantiate(ResourceReader.Boy);
            }
            else
            {
                flesh = Object.Instantiate(ResourceReader.Girl);
            }

            flesh.name = "Chr" + id.ToString();
            flesh.transform.position = TerrainLogic.Project(position);
        }