Beispiel #1
0
 public virtual void Awake()
 {
     area   = transform.GetChild(0).gameObject;
     box    = GetComponent <BoxCollider2D>();
     an     = GetComponent <Animator>();
     visual = GetComponent <AreaVisual>();
 }
Beispiel #2
0
    public override void OnValidate()
    {
        base.OnValidate();
        AreaVisual av = GetComponent <AreaVisual>();

        foreach (Transform action in actions)
        {
            action.GetComponent <AreaVisual>().SetColor(av.areaColor);
        }
        av.SetAreaName(RoomName);
    }