public static Notice create(float x, float y, double disappear_time, MySprite.Kind kind, MySprite.Type type, bool blink) { int cnt = 0; while (pool_[pool_index_].alive_) { ++pool_index_; if (pool_index_ >= POOL_MAX) { pool_index_ = 0; } ++cnt; if (cnt >= POOL_MAX) { Debug.LogError("EXCEED Notice POOL!"); break; } } var obj = pool_[pool_index_]; obj.init(x, y, disappear_time, kind, type, blink); return(obj); }
public static Notice create(float x, float y, MySprite.Kind kind, MySprite.Type type, bool blink) { return(create(x, y, -1f /* disappear_time */, kind, type, blink)); }
private void init(float x, float y, double disappear_time, MySprite.Kind kind, MySprite.Type type, bool blink) { base.init(); x_ = x; y_ = y; disappear_time_ = disappear_time; kind_ = kind; type_ = type; blink_ = blink; blink_time_ = 0f; blink_rest_ = 10; display_ = true; }