// Use this for initialization void Start() { com.set_player(this); if (game_object == null) { game_object = gameObject; } am = game_object.AddComponent <AttributesManager> (); ci = game_object.AddComponent <camera_and_input> (); hp = game_object.AddComponent <hp_handler> (); mp = game_object.AddComponent <mana_handler> (); exp = game_object.AddComponent <exp_handler_player> (); fr = game_object.AddComponent <fire_ring> (); sk = game_object.AddComponent <skill> (); fr_view = game_object.AddComponent <fire_ring_view> (); am.OnAttributesChange += hp.update_controller; am.OnAttributesChange += mp.update_controller; hp.am = mp.am = am; hp.add_dead_callback(mp.dead); am.AddBuff(exp); ci.init(); hp.init(0x3fffffff); mp.init(); exp.init(); }
// Use this for initialization void Start() { p = com.p; view = com.p.fr_view; }