public static ShadowParams SetShadowObject(CharacterParams character) { GameObject gameObject = UnityEngine.Object.Instantiate <GameObject>(ShadowParams.GetShadowParamPrefab()); gameObject.name = "Shadow"; gameObject.transform.SetParent(character.transform); gameObject.transform.position = new Vector3(character.characterCenterTarget.position.x, character.characterCenterTarget.position.y + character.RootToCenterDistance(), character.characterCenterTarget.position.z); gameObject.transform.localRotation = Quaternion.identity; gameObject.transform.localScale = Vector3.one; ShadowParams component = gameObject.GetComponent <ShadowParams>(); foreach (Renderer renderer in character.transform.GetComponentsInChildren <Renderer>()) { renderer.gameObject.layer = component.shadowLayerMask.value; } component.Initialize(); return(component); }
public static void SetVariableValue(ShadowParams param, Vector3 value) { Native.Engine3DInterop.SetTimeOfDayVariableValueColor((int)param, value); }
public static void SetVariableValue(ShadowParams param, float value) { Native.Engine3DInterop.SetTimeOfDayVariableValue((int)param, value); }
public static void SetVariableValue(ShadowParams param, Vec3 value) { Native3DEngineMethods.SetTimeOfDayVariableValueColor((int)param, value); }
public void SetShadowObject() { this.shadowObject = ShadowParams.SetShadowObject(this); }