Example #1
0
    // public

    public void Start()
    {
        luaObject = new LuaMapEvent(this);
        luaObject.Set(PropertyCollide, LuaOnCollide);
        luaObject.Set(PropertyInteract, LuaOnInteract);
        luaObject.Set(PropertyCondition, LuaCondition);

        GetComponent <Dispatch>().RegisterListener(EventCollide, (object payload) => {
            OnCollide((AvatarEvent)payload);
        });
        GetComponent <Dispatch>().RegisterListener(EventInteract, (object payload) => {
            OnInteract((AvatarEvent)payload);
        });

        CheckEnabled();
    }
Example #2
0
 public void faceToward(LuaMapEvent other)
 {
     mapEvent.GetComponent <CharaEvent>().Facing = mapEvent.DirectionTo(other.mapEvent);
 }
Example #3
0
 public void Awake()
 {
     LuaObject = new LuaMapEvent(this);
 }