Пример #1
0
        // Use this for initialization
        void Start()
        {
            marker = new UnitMarker("mpicon_04", new Vector2(22, 22));
            marker.SetMarkerPosition(transform.position);
            guideImage = new UnitMarker("mark", new Vector2(100, 100));
            guideImage.SetMarkerPosition(transform.position);
            guideImage.GetMarkerImage().color = new Color(1, 1, 1, 0f);

            GameObject obj = new GameObject();

            obj.name             = "manualImage";
            obj.transform.parent = BattleUI.canvas.transform;

            manualImage        = obj.AddComponent <Image> ();
            manualImage.sprite = Resources.Load("UserInterface/temp_box", typeof(Sprite)) as Sprite;
            manualImage.rectTransform.anchorMax = Vector2.zero;
            manualImage.rectTransform.anchorMin = Vector2.zero;
            manualImage.rectTransform.pivot     = Vector2.zero;

            manualImage.rectTransform.position  = new Vector3(10 * BattleUI.ratio_width, 460 * BattleUI.ratio_height, 0f);
            manualImage.rectTransform.sizeDelta = new Vector2(1020 * BattleUI.ratio_width, 133 * BattleUI.ratio_height);
            manualImage.color = new Color(1, 1, 1, 0f);

            InvokeRepeating("StartManualAnimation", 2f, 60f);
        }
Пример #2
0
 public virtual void Prepare(PlayerController son, EnemyData data)
 {
     player      = son;
     enemyList   = new List <EnemyController> ();
     animator    = GetComponent <Animator> ();
     distance    = (player.transform.position - transform.position).magnitude;
     parentPoint = GetComponentInParent <CreateEnemyPoint> ();
     childEnemy  = data;
     CreateAbeSan();
     marker = new UnitMarker();
     timer  = Time.time;
 }