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);
    }
Exemple #2
0
 public static void SetVariableValue(ShadowParams param, Vector3 value)
 {
     Native.Engine3DInterop.SetTimeOfDayVariableValueColor((int)param, value);
 }
Exemple #3
0
 public static void SetVariableValue(ShadowParams param, float value)
 {
     Native.Engine3DInterop.SetTimeOfDayVariableValue((int)param, value);
 }
Exemple #4
0
 public static void SetVariableValue(ShadowParams param, Vector3 value)
 {
     Native.Engine3DInterop.SetTimeOfDayVariableValueColor((int)param, value);
 }
Exemple #5
0
 public static void SetVariableValue(ShadowParams param, float value)
 {
     Native.Engine3DInterop.SetTimeOfDayVariableValue((int)param, value);
 }
Exemple #6
0
 public static void SetVariableValue(ShadowParams param, Vec3 value)
 {
     Native3DEngineMethods.SetTimeOfDayVariableValueColor((int)param, value);
 }
Exemple #7
0
 public void SetShadowObject()
 {
     this.shadowObject = ShadowParams.SetShadowObject(this);
 }
Exemple #8
0
 public static void SetVariableValue(ShadowParams param, Vec3 value)
 {
     Native3DEngineMethods.SetTimeOfDayVariableValueColor((int)param, value);
 }