void Awake() { base.SetDump(true); renderer = GetComponent <Renderer>(); mhb = transform.parent.GetComponent <MinuteHolderBe>(); call = gameObject.AddComponent(typeof(ActionSet)) as ActionSet; }
void Awake() { base.SetDump(true); renderer = GetComponent <Renderer>(); mhb = transform.parent.GetComponent <MinuteHolderBe>(); //the ActionSet functions somewhat like an interface // here is the call from the holder... mFormBe.call.implode(); // so whatever componant is assigned to "call" should have method implode // so this MinuteFormBe can change its behaviour over time by swaping ActionSets call = gameObject.AddComponent(typeof(ActionSet)) as ActionSet; }
// Class knows how to populate seconds but will wait public TimeObjMinute(DateTime _dt, Transform parent, TimeObj _dictValue, bool cascade) { Transform _t = Transform.Instantiate(MessageMgr.Instance.minute, EtcMgr.getPosition(_dt), EtcMgr.getRotationMinute(_dt), parent) as Transform; dictValue = _dictValue; // the TimeObj mGo = _t.gameObject; dictValue.Minute = mGo; dictValue.isMinute = true; this.dt = _dt; mGo.name = "M" + dt.Minute; mHolderGo = mGo.GetFirstChild(); mHolderGo.layer = 9; mHolderB = mGo.GetComponent <MinuteHolderBe>(); mHolderB.setDateTime(_dt); mHolderB.Register(dictValue); }
void Start() { me = GetComponent <MinuteHolderBe>(); shapeGo = transform.GetChild(0).gameObject; mFormBe = shapeGo.GetComponent <MinuteFormBe>(); }