Esempio n. 1
0
    // Use this for initialization
    void Start()
    {
        if (this.data == null)
        {
            this.data = new IceDrillData()
            {
                PowerableInstanceID = Guid.NewGuid().ToString()
            }
        }
        ;

        Drill.localPosition = Vector3.zero;

        foreach (Animator LegController in LegControllers)
        {
            LegController.SetBool("LegDown", LegsDown);
        }

        this.InitializePowerVisualization();
        CrateAnchor.gameObject.SetActive(false);
    }

    // Update is called once per frame
    void Update()
    {
        if (IsOn)
        {
            Drill.Rotate(Vector3.forward, 2f, Space.Self);
            if (HasAttachedWaterContainer && capturedResource.Data.Container.CurrentAmount < 1f)
            {
                capturedResource.Data.Container.Push(this.HostDeposit.Data.Extractable.Pull(Time.deltaTime * WaterPerSecond));
            }
        }
    }
Esempio n. 2
0
 public void ToggleLegs()
 {
     LegsDown = !LegsDown;
     foreach(Animator LegController in LegControllers)
     {
         LegController.SetBool("LegDown", LegsDown);
     }
     Socket.tag = LegsDown ? "powerplug" : "Untagged";
     CrateAnchor.gameObject.SetActive(LegsDown);
 }
Esempio n. 3
0
    // Use this for initialization
    void Start ()
    {
        if (this.data == null)
            this.data = new IceDrillData()
            {
                PowerableInstanceID = Guid.NewGuid().ToString()
            };

        Drill.localPosition = Vector3.zero;

        foreach (Animator LegController in LegControllers)
        {
            LegController.SetBool("LegDown", LegsDown);
        }

        this.InitializePowerVisualization();
        CrateAnchor.gameObject.SetActive(false);

    }