public override void OnLoad() { GameObject go = new GameObject("Camera Tracking Mod"); ChewChew chw = go.AddComponent <ChewChew>(); StatMaster.DontDestroyOnLoad(go); ButtonBalls.INNIT(chw); }
void FixedUpdate() { bool isBuildingMode = ((StatMaster.SimulationState == SimulationState.SpectatorMode) || (StatMaster.SimulationState == SimulationState.BuildMode) || (StatMaster.SimulationState == SimulationState.BuildModeGlobalSim) || (StatMaster.SimulationState == SimulationState.BuildModeGlobalSimRemoteLocalSim) || (StatMaster.SimulationState == SimulationState.BuildModeRemoteLocalSim)); this.transform.position = Vector3.Lerp(this.transform.position, Camera.main.ScreenToWorldPoint(ButtonBalls.RatioApply(Camera.main.pixelRect, ShowUp && isBuildingMode ? ShowLocationRatio : HideLocationRatio)), 0.1f); this.transform.localScale = Vector3.Lerp(this.transform.localScale, ShowUp && isBuildingMode ? Vector3.one : Vector3.zero, 0.1f); }