Exemplo n.º 1
0
    protected void OnInvalidPosition()
    {
        pickedActor.OnInvalidPosition();

        if (pickedActor is Landscaping)
        {
            // Revert it back.
            Vector3 size = ContainerManifest.GetContainerDefinition("Raised Bed").ContainerSoilSize;

            pickedActor.SetScale(size);
        }
    }
Exemplo n.º 2
0
    protected void SpawnContainer(string name)
    {
        ContainerDefinition cDef = ContainerManifest.GetContainerDefinition(name);

        if (cDef == null)
        {
            return; // If the ContainerDefinition is null, we just return here. We will have already logged an error in ContainerManifest's function which will have our stack trace.
        }
        Container c = Instantiate(cDef.Actor, inputPosition,
                                  Quaternion.identity, transform);

        Containers.Add(c);

        c.Definition = cDef;

        pickedActor = c;
        pickedActor.transform.position = inputPosition;
    }