Beispiel #1
0
    public void Init(BattleLayout layout)
    {
        m_Characters = GetComponentsInChildren <CharacterContainer>();

//         foreach (var container in m_Characters)
//             container.Init(new CreatureDummy(container, container.GetComponentInChildren<Character>()));
    }
Beispiel #2
0
        public GameForm(Battle gameBattle)
        {
            this.gameBattle  = gameBattle;
            gameBattleLayout = new BattleLayout(this, gameBattle);

            InitializeComponent();
            ;
        }
        public new static void Init()
        {
            // call original function
            orig_Init();

            Console.WriteLine("Adding new battle layouts");

            // add new layouts
            BattleLayout.Create("some_name").Add <EnemyBookworm>(3);
            // etc.
        }
Beispiel #4
0
        public static void Init()
        {
            // call original function
            // orig_Init();

            TestMod.TestMod.Instance.Logger.Log("Adding new battle layouts");

            // add new layouts
            BattleLayout.Create("some_name").Add <EnemyBookworm>(3);
            // etc.
        }
Beispiel #5
0
    public void Batch(BattleLayout layout)
    {
        if (Center != null)
        {
            Vector3 vCenter = Vector3.zero;
            vCenter.x = (m_Characters.Length - 1) * -layout.horizontal * 0.5f;
            Center.transform.localPosition = vCenter;
        }

        Vector3 pos = Vector3.zero;

        pos.z = layout.TopFirst ? layout.vertical : -layout.vertical;

        for (int i = 0; i < m_Characters.Length; ++i)
        {
            pos.x = i * -layout.horizontal;
            m_Characters[i].Batch(pos);
            pos.z *= -1f;
        }
    }