28 lines
557 B
C#
28 lines
557 B
C#
using JetBrains.Annotations;
|
|
using System;
|
|
using UnityEngine;
|
|
|
|
public class ChildModelBehaviour : ModelBehaviour
|
|
{
|
|
public ChildModel ChildModel
|
|
{
|
|
get
|
|
{
|
|
if (Model == null)
|
|
{
|
|
return null;
|
|
}
|
|
if (Model is ChildModel cModel)
|
|
{
|
|
return cModel;
|
|
}
|
|
throw new InvalidCastException("ChildModelBehaviour needs to be of type ChildModel");
|
|
}
|
|
internal set
|
|
{
|
|
Model = value;
|
|
}
|
|
}
|
|
|
|
|
|
} |