Beispiel #1
0
        public override void Generate(FizzleJson data)
        {
            m_DefaultActivate = data.GetOrDefault("default-activate", m_DefaultActivate);
            string faceAt = data.GetOrDefault("face-at", "forward").ToLower();

            switch (faceAt)
            {
            case "left":
                transform.parent.eulerAngles += 90.0F * Vector3.up;
                break;

            case "back":
                transform.parent.eulerAngles += 180.0F * Vector3.up;
                break;

            case "right":
                transform.parent.eulerAngles += 270.0F * Vector3.up;
                break;

            default:
                faceAt = "forward";
                break;
            }
            ActiveColor   = (FizzleColor)data.GetOrDefault("active-color", ActiveColor.ToString());
            DeactiveColor = (FizzleColor)data.GetOrDefault("deactive-color", DeactiveColor.ToString());
            FizzleDebug.Log($"FizzleButton name = {(object) data["name"] ?? name}, default-activate = {m_DefaultActivate}, face-at = {faceAt}, active-color = {ActiveColor}, deactive-color = {DeactiveColor}");
        }
Beispiel #2
0
 public override void Generate(FizzleJson data)
 {
     base.Generate(data);
     m_DefaultActivate = data.GetOrDefault("default-activate", m_DefaultActivate);
     ActiveColor       = (FizzleColor)data.GetOrDefault("active-color", ActiveColor.ToString());
     DeactiveColor     = (FizzleColor)data.GetOrDefault("deactive-color", DeactiveColor.ToString());
     FizzleDebug.Log($"FizzleLogicCurtain name = {(object) data["name"] ?? name}, default-activate = {m_DefaultActivate}, active-color = {ActiveColor}, deactive-color = {DeactiveColor}");
 }
Beispiel #3
0
 public void Generate(FizzleJson data)
 {
     ActiveColor   = (FizzleColor)data.GetOrDefault("active-color", ActiveColor.ToString());
     DeactiveColor = (FizzleColor)data.GetOrDefault("deactive-color", DeactiveColor.ToString());
     FizzleDebug.Log($"PressurePlate name = {(object) data["name"] ?? name}, active-color = {ActiveColor}, deactive-color = {DeactiveColor}");
 }